$disconnected

By RubixCube on Oct 23, 2007

The idea was based off of hixxy's $joined snippet. Returns the total number of seconds you have been disconnected from a network. Syntax: $disconnected(network).

For example (if I were just disconnected from Dalnet): $disconnected(DALNET)

Why make a snippet like this? Just something I tried out. Nothing really of major significance, just something I made when I was bored.

  • RubixCube
; $disconnected
; RubixCube
; $disconnected(network)
; Don't rip. Thanks

on *:DISCONNECT:{ hadd -m disconnect $+(server,.,$network) $ctime }
on *:CONNECT:{ 
  if ($hget(disconnect,$+(server,.,$network))) { 
    hdel disconnect $+(server,.,$network) 
  }
}

alias disconnected { 
  if ($1 && $isid) {
    if ($($hget(disconnect,$+(server,.,$1)),2)) { 
      return $calc($ctime - $v1)
    }
    else { return $false } 
  }
}

Comments

Sign in to comment.
RubixCube   -  Oct 23, 2007

Alright, updated. Thanks a bunch mountaindew.

 Respond  
guest598594   -  Oct 23, 2007

u might wanna check if ($isid)

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.