Public paste
Undefined
By: Guest | Date: Nov 12 2022 19:19 | Format: None | Expires: never | Size: 874 B | Hits: 220

  1. alias -l channel { return #bnc4you.debug }
  2.  
  3. ON *:notice:*:?: {
  4.   if (*attached to* iswm $1-) {
  5.     var %ip = $remove($7,$chr(40),$chr(41))
  6.  
  7.     var %nicks = $hget(BNC_LOGINS,%ip)
  8.     var %nicks = $addtok(%nicks,$2,32)
  9.     var %total = $numtok(%nicks,32)
  10.  
  11.     hadd -m BNC_LOGINS %ip %nicks
  12.  
  13.     if (%total > 1) { var %extra = - Clones ( $+ %total $+ ): %nicks }
  14.  
  15.     msg $channel (3IN) $1- %extra
  16.   }
  17.  
  18.   if (*detached* iswm $1-) {
  19.     var %ip = $remove($5,$chr(40),$chr(41))
  20.  
  21.     var %nicks = $hget(BNC_LOGINS,%ip)
  22.     var %nicks = $remtok(%nicks,$2,1,32)
  23.     var %total = $numtok(%nicks,32)
  24.  
  25.     if (%total) { hadd -m BNC_LOGINS %ip %nicks }
  26.     else {
  27.       if ($hget(BNC_LOGINS,%ip)) { hdel BNC_LOGINS %ip }
  28.     }
  29.  
  30.     if (%total > 1) { var %extra = - Clones ( $+ %total $+ ): %nicks }
  31.  
  32.     msg $channel (4OUT) $1- %extra
  33.   }
  34. }
  35.