Advertisement
westor

$IRCD identifier for Koragg v1.1

Apr 9th, 2020
1,311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.50 KB | None | 0 0
  1. alias ircd {
  2.   if ($status !== connected) { return 0 }
  3.  
  4.   if ($1) { var %v = $ircd_find_by_network($1) }
  5.   else { var %v = $hget(IRCD,$server) }
  6.  
  7.   return $iif(%v,$v1,0)
  8. }
  9.  
  10. RAW 002:*: { hadd -m IRCD $server $2- }
  11.  
  12. alias -l ircd_find_by_network {
  13.   if (!$1) { return 0 }
  14.  
  15.   var %t = $scon(0)
  16.  
  17.   var %i = 1
  18.   while (%i <= %t) {
  19.     var %n = $scon(%i).network
  20.     var %s = $scon(%i).server
  21.     var %v = $hget(IRCD,%s)
  22.  
  23.     if (%n == $1) && (%v) { return %v }
  24.  
  25.     inc %i
  26.   }
  27.  
  28.   return 0
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement