westor

ZNC Report Clones for davEyw v1.1

Oct 19th, 2020 (edited)
2,653
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data