Advertisement
makimaki

Aop/Banscan

Jan 13th, 2011
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.42 KB | None | 0 0
  1. ; -----------------------------)
  2. ; -- AOP & Banlist Fibonacci --)
  3. ; -----------------------------)
  4. ;Update aop, scan for banlisted users
  5. ;Created by MakiMaki for seraphim
  6.  
  7. ;AOP Update
  8. alias update.aop {
  9.   var %i 0, %o 0, %h 0
  10.   while (%i < $nick(#,0)) {
  11.     inc %i
  12.     if ($nick(#,%i) != $me) {
  13.       if ($nick(#,%i) isowner #) && (!$get.aop(# $+ _local_Owners, $uid($nick(#,%i)))) { add.aop # $+ _local_Owners $uid($nick(#,%i)) $nick(#,%i) # Owner | inc %o }
  14.       elseif ($nick(#,%i) isop #) && (!$get.aop(# $+ _local_Owners, $uid($nick(#,%i)))) && ($nick(#,%i) !isowner #) { add.aop # $+ _local_Host $uid($nick(#,%i)) $nick(#,%i) # Host | inc %h }
  15.   } }
  16.   msg # * %o Owners  and %h Hosts, New entries have been logged. AOP Update Completed.
  17. }
  18.  
  19. ;Banlist room scan
  20. alias banscan {
  21.   var %i 0, %b 0
  22.   while (%i < $nick($1,0)) {
  23.     inc %i
  24.     if ($nick($1,%i) != $me) {
  25.       if ($get.ban(Global_Banlist,$uid($nick($1,%i)))) { user.ban $1 $nick($1,%i) 0 Banlisted Banlist scan and $nick($1,%i) you are on ban status. | inc %b }
  26.       if ($get.ban(local_ $+ # $+ _banlist,$uid($nick($1,%i)))) { user.ban $1 $nick($1,%i) 0 Banlisted Banlist scan and $nick($1,%i) you are on ban status. | inc %b }
  27.   } }
  28.   msg $1 * Total of %b Banlisted users found.
  29. }
  30.  
  31. ;AOP Data
  32. alias get.aop return $readini(data\ $+ $network $+ aop.ini,$1,$2)
  33. alias add.aop writeini data\ $+ $network $+ aop.ini $1-
  34. alias rem.aop remini -n data\ $+ $network $+ aop.ini $1-
  35.  
  36. ;Ban Data
  37. alias get.ban return $readini(data\ $+ $network $+ banlist.ini,$1,$2)
  38. alias add.ban writeini data\ $+ $network $+ banlist.ini $1-
  39. alias rem.ban remini -n data\ $+ $network $+ banlist.ini $1-
  40.  
  41. alias uid return $ial($1).user
  42.  
  43. ;Join event
  44. on *:JOIN:#: {
  45.   var %id $uid($nick)
  46.   if ($me !isop #) { return }
  47.  
  48.   ;Banlists
  49.   if ($level(%ad) == banlist) { user.ban # $nick 0 Banlisted You are currently on ban status. | return }
  50.   elseif ($get.ban(Global_Banlist,%id)) { user.ban # $nick 0 Banlisted $gettok($get.ban(Global_Banlist,%id), 2-, 32) | return }
  51.   elseif ($get.ban(local_ $+ # $+ _banlist,%id)) && ($get.ban(#,banlist) != halt) { user.ban # $nick 0 Banlisted $gettok($get.ban(local_ $+ # $+ _banlist,%id), 2-, 32) | return }
  52.  
  53.  
  54.   ;AOP
  55.   if ($get.aop(#,AOP) != halt) {
  56.     if ($get.aop(# $+ _local_Owners,%id) || $get.aop(Global_Owners,%id) ) { mode # +q $nick }
  57.     elseif ($get.aop(# $+ _local_Host,%id) || $get.aop(Global_Host,%id)) { mode # +o $nick }
  58. } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement