Advertisement
westor

Nicks Per IP for GaMbiTo v3.0

Dec 4th, 2020 (edited)
2,179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.22 KB | None | 0 0
  1. ON *:START: {
  2.   hmake NIPS 5000
  3.  
  4.   var %f = nips.db
  5.  
  6.   if ($file(%f)) { hload NIPS $qt(%f) }
  7. }
  8.  
  9. ON *:EXIT: {
  10.   var %f = nips.db
  11.  
  12.   if ($hget(NIPS)) && ($hget(NIPS,0).item) { hsave NIPS $qt(%f) }
  13. }
  14.  
  15. ON *:TEXT:*:#amigos,#pensandoenvozalta,#ircops: {
  16.   tokenize 32 $strip($1-)
  17.  
  18.   if ($1 == !ipnicks) {
  19.     if (!$2) { msg $chan ( $+ $nick $+ ): 4ERROR 2Por favor especifique una 3IP! | return }
  20.  
  21.     var %t = $hfind(NIPS,$2,0,w)
  22.  
  23.     if (!%t) { msg $chan ( $+ $nick $+ ): 2no se encontraron resultados para4 $bold($2) | return }
  24.  
  25.     msg $chan ( $+ $nick $+ ): $iif(%t == 1,2Se encontró3 $bold(%t) 2cambios de nick:,2Hay3 $bold(%t) 2Cambios de nick) Para la IP4 $bold($2)
  26.  
  27.     var %i = 1
  28.     while (%i <= %t) {
  29.       var %e = $hfind(NIPS,$2,%i,w)
  30.       var %n = $hget(NIPS,%e)
  31.  
  32.       if (%e) && (%n) { msg $chan ( $+ $nick $+ ): 2Para la IP:4 $bold(%e) 2- $iif($numtok(%n,32) == 1,2El nick es:,2Los apodos eran:4) $bold($col_items(%n)) }
  33.  
  34.       inc %i
  35.     }
  36.   }
  37.  
  38. }
  39.  
  40. ON *:SNOTICE:*: {
  41.   tokenize 32 $strip($1-)
  42.  
  43.   if (*Conectando* iswm $1-) {
  44.     var %nick = $3
  45.     var %ip = $remove($5,[,])
  46.  
  47.     if (%nick == $me) || (%ip == $ip) || ($iptype(%ip) !== ipv4) { return }
  48.  
  49.     var %r = $hget(NIPS,%ip)
  50.  
  51.     var %r = $addtok(%r,%nick,32)
  52.  
  53.     hadd NIPS %ip %r
  54.   }
  55.  
  56.   if (*Cambia el nick a* iswm $1-) {
  57.     var %old_nick = $2
  58.     var %new_nick = $9
  59.     var %ip = $remove($4,[,])
  60.  
  61.     if (%old_nick == $me) || (%new_nick == $me) || (%ip == $ip) || ($iptype(%ip) !== ipv4) { return }
  62.  
  63.     var %r = $hget(NIPS,%ip)
  64.  
  65.     var %r = $addtok(%r,%old_nick,32)
  66.     var %r = $addtok(%r,%new_nick,32)
  67.  
  68.     hadd NIPS %ip %r
  69.   }
  70.  
  71. }
  72.  
  73. alias -l bold { return $+($chr(2),$1-,$chr(2)) }
  74. alias -l col_items {
  75.   if (!$1) { return }
  76.  
  77.   var %1_color = 04
  78.   var %2_color = 02
  79.  
  80.   var %t = $numtok($1-,32)
  81.   var %i = 1
  82.  
  83.   while (%i <= %t) {
  84.     var %m = $gettok($1-,%i,32)
  85.  
  86.     if (%m !== $null) {
  87.       if (!%prev) { var %tot = $addtok(%tot,$+($chr(3),%1_color,$chr(2),$chr(2),%m,$chr(3),$chr(2),$chr(2)),32) | var %prev = 1 }
  88.       else { var %tot = $addtok(%tot,$+($chr(3),%2_color,$chr(2),$chr(2),%m,$chr(3),$chr(2),$chr(2)),32) | var %prev = 0 }
  89.     }
  90.  
  91.     inc %i
  92.   }
  93.  
  94.   return %tot
  95. }
  96.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement