SHARE
TWEET

Userlist 3.1+Bot

Seb Jun 13th, 2010 (edited) 278 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #########################
  2. #    Userlist System    #
  3. #  Version: 3.1+Bot     #
  4. # By: Sebastien         #
  5. # Mail: xplorer@live.ca #
  6. # Net: irc.undernet.org #
  7. # Chan: #mircscripting  #
  8. #########################
  9. on *:JOIN:#:{
  10.   if ($readini(database\ $+ $chan $+ .ini, suspend, $address($nick,2))) {
  11.     msg $chan $+([,$nick,]) Is Suspended
  12.     halt
  13.   }
  14.   if ($readini(database\ $+ $chan $+ .ini, infoline, $address($nick,2))) {
  15.     if ($nick == $me) { return }
  16.     msg $chan ( $+ $nick $+ ) $readini(database\ $+ $chan $+ .ini, infoline, $address($nick,2))
  17.   }
  18.   if ($readini(database\ $+ $chan $+ .ini, opjoin, $address($nick,2)) == 1) && ($readini(database\ $+ $chan $+ .ini, voicejoin, $address($nick,2)) == 1) {
  19.     .mode # +ov # $nick
  20.     halt
  21.   }
  22.   if ($readini(database\ $+ $chan $+ .ini, opjoin, $address($nick,2)) == 1) {
  23.     mode $chan +o $nick
  24.     halt
  25.   }
  26.   if ($readini(database\ $+ $chan $+ .ini, voicejoin, $address($nick,2)) == 1) {
  27.     mode $chan +v $nick
  28.     halt
  29.   }
  30. }
  31. on *:KICK:#:{
  32.   if ($readini(database\ $+ $chan $+ .ini, protect, $address($knick,2)) == 1) {
  33.     ban -k $chan $nick $knick is Protected! [Suspended: 1h]
  34.     writeini $+(database\,$chan,.ini) suspend $address($nick,2) 1
  35.     .timer 1 3600 remini $+(database\,$chan,.ini) suspend $address($nick,2) 1
  36.   }
  37. }
  38. on *:ban:#:{
  39.   if ($bnick == $nick) { halt }
  40.   if ($readini(database\ $+ $chan $+ .ini, protect, $address($bnick,2)) == 1) {
  41.     mode $chan -bo+b $banmask $nick $address($nick,2)
  42.     kick $chan $nick $bnick is Protected! [Suspended: 1h]
  43.     writeini $+(database\,$chan,.ini) suspend $address($nick,2) 1    
  44.     .timer 1 3600 remini $+(database\,$chan,.ini) suspend $address($nick,2) 1
  45.   }
  46. }
  47. on *:DEOP:#:{
  48.   if ($nick == $me) { halt }
  49.   if ($opnick == $nick) { halt }
  50.   if ($readini(database\ $+ $chan $+ .ini, keepop, $address($opnick,2)) == 1) {
  51.     mode $chan -o+o $nick $opnick
  52.     ;msg $chan $opnick has KeepOp Enabled
  53.   }
  54. }
  55.  
  56. on *:text:.wget *:#:{
  57.   msg $chan Levels for $2 with this mask :: $address($2,2)
  58.   msg $chan $&
  59.     $iif($readini(database\ $+ $chan $+ .ini, chanbot, $address($2,2)),3+chanbot,4-chanbot) $&    
  60.     $iif($readini(database\ $+ $chan $+ .ini, infoline, $address($2,2)),3+infoline,4-infoline) $&    
  61.     $iif($readini(database\ $+ $chan $+ .ini, opjoin, $address($2,2)),3+AutoOp,4-autoop) $&    
  62.     $iif($readini(database\ $+ $chan $+ .ini, voicejoin, $address($2,2)),3+AutoVoice,4-autovoice) $&    
  63.     $iif($readini(database\ $+ $chan $+ .ini, keepop, $address($2,2)),3+KeepOp,4-keepop) $&    
  64.     $iif($readini(database\ $+ $chan $+ .ini, bot, $address($2,2)),3+Bot,4-bot) $&
  65.     $iif($readini(database\ $+ $chan $+ .ini, protect, $address($2,2)),3+Protect,4-protect) $&
  66.     $iif($readini(database\ $+ $chan $+ .ini, suspend, $address($2,2)),3+suspend,4-suspend)    
  67.   $iif($readini(database\ $+ $chan $+ .ini, infoline, $address($2,2)),msg $chan Infoline: $readini(database\ $+ $chan $+ .ini, infoline, $address($2,2)),$null)
  68. }
  69.  
  70. alias showlevels {
  71.   echo -a command disabled for now
  72.   ;msg $chan Levels for $1 with this mask :: $address($1,2)
  73.   ;msg $chan $&
  74.     $iif($readini(database\ $+ $chan $+ .ini, chanbot, $address($1,2)),3+chanbot,4-chanbot) $&    
  75.     $iif($readini(database\ $+ $chan $+ .ini, infoline, $address($1,2)),3+infoline,4-infoline) $&    
  76.     $iif($readini(database\ $+ $chan $+ .ini, opjoin, $address($1,2)),3+AutoOp,4-autoop) $&    
  77.     $iif($readini(database\ $+ $chan $+ .ini, voicejoin, $address($1,2)),3+AutoVoice,4-autovoice) $&    
  78.     $iif($readini(database\ $+ $chan $+ .ini, keepop, $address($1,2)),3+KeepOp,4-keepop) $&    
  79.     $iif($readini(database\ $+ $chan $+ .ini, bot, $address($1,2)),3+Bot,4-bot) $&
  80.     $iif($readini(database\ $+ $chan $+ .ini, protect, $address($1,2)),3+Protect,4-protect)              
  81. }
  82.  
  83.  
  84. alias update.levels {
  85.   msg $2 Levels for $1 with this mask :: $address($1,2)
  86.   msg $2 $&
  87.     $iif($readini(database\ $+ $2 $+ .ini, chanbot, $address($1,2)),3+chanbot,4-chanbot) $&    
  88.     $iif($readini(database\ $+ $2 $+ .ini, infoline, $address($1,2)),3+infoline,4-infoline) $&    
  89.     $iif($readini(database\ $+ $2 $+ .ini, opjoin, $address($1,2)),3+AutoOp,4-autoop) $&    
  90.     $iif($readini(database\ $+ $2 $+ .ini, voicejoin, $address($1,2)),3+AutoVoice,4-autovoice) $&    
  91.     $iif($readini(database\ $+ $2 $+ .ini, keepop, $address($1,2)),3+KeepOp,4-keepop) $&    
  92.     $iif($readini(database\ $+ $2 $+ .ini, bot, $address($1,2)),3+Bot,4-bot) $&
  93.     $iif($readini(database\ $+ $2 $+ .ini, protect, $address($1,2)),3+Protect,4-protect) $&
  94.     $iif($readini(database\ $+ $2 $+ .ini, suspend, $address($2,2)),3+suspend,4-suspend)        
  95. }
  96.  
  97. alias cu.update {
  98.   if ($timershow) { halt }
  99.   set %dbupchan $chan
  100.   .timer $+ show 1 2 update.levels $1 %dbupchan
  101.   unset %dbupchan
  102. }
  103.  
  104. on *:TEXT:.mod *:#:{
  105.   if ($readini(database\ $+ $chan $+ .ini, chanbot, $address($nick,2)) !== 1) {
  106.     msg $chan you need CHANBOT level to use this command.
  107.     HALT
  108.   }
  109.   if ($readini(database\ $+ $chan $+ .ini, chanbot, $address($nick,2)) == 1) {
  110.     if (+bot isin $3-) { writeini $+(database\,$chan,.ini) bot $address($2,2) 1 | cu.update $2 }
  111.     if (+autoop isin $3-) { writeini $+(database\,$chan,.ini) opjoin $address($2,2) 1 | cu.update $2 | mode $chan +o $2 }
  112.     if (+autovoice isin $3-) { writeini $+(database\,$chan,.ini) voicejoin $address($2,2) 1 | cu.update $2 | mode $chan +v $2 }
  113.     if (+keepop isin $3-) { writeini $+(database\,$chan,.ini) keepop $address($2,2) 1 | cu.update $2 }
  114.     if (+protect isin $3-) { writeini $+(database\,$chan,.ini) protect $address($2,2) 1 | cu.update $2 }
  115.     if (+chanbot isin $3-) { writeini $+(database\,$chan,.ini) chanbot $address($2,2) 1 | cu.update $2 }
  116.     if (+suspend isin $3-) { writeini $+(database\,$chan,.ini) suspend $address($2,2) 1 | cu.update $2 }    
  117.     if (-bot isin $3-) { remini $+(database\,$chan,.ini) bot $address($2,2) | cu.update $2 }
  118.     if (-autoop isin $3-) { remini $+(database\,$chan,.ini) opjoin $address($2,2) | cu.update $2 | mode $chan -o $2 }
  119.     if (-autovoice isin $3-) { remini $+(database\,$chan,.ini) voicejoin $address($2,2) | cu.update $2 | mode $chan -v $2 }
  120.     if (-keepop isin $3-) { remini $+(database\,$chan,.ini) keepop $address($2,2) | cu.update $2 }
  121.     if (-protect isin $3-) { remini $+(database\,$chan,.ini) protect $address($2,2) | cu.update $2 }
  122.     if (-chanbot isin $3-) { remini $+(database\,$chan,.ini) chanbot $address($2,2) | cu.update $2 }
  123.     if (-suspend isin $3-) { remini $+(database\,$chan,.ini) suspend $address($2,2) 1 | cu.update $2 }    
  124.   }
  125. }
  126.  
  127. on *:text:+infoline *:#:{
  128.   writeini $+(database\,$chan,.ini) infoline $address($nick,2) $2-
  129.   .notice $nick Added infoline to $nick on $chan :: $2-
  130. }
  131. on *:text:-infoline:#:{
  132.   remini $+(database\,$chan,.ini) infoline $address($nick,2)
  133.   .notice $nick Removed Infoline From $nick on $chan
  134. }
  135.  
  136. menu nicklist {
  137.   Userlist
  138.   .Add
  139.   ..ChanBot:writeini $+(database\,$chan,.ini) chanbot $address($$1,2) 1 | echo -a Added $$1 To Chanbot level on $chan with this host: $address($$1,2) | mode $chan +o $$1
  140.   ..Op:writeini $+(database\,$chan,.ini) opjoin $address($$1,2) 1 | echo -a Added $$1 To Op list on $chan with this host: $address($$1,2) | mode $chan +o $$1
  141.   ..Voice:writeini $+(database\,$chan,.ini) voicejoin $address($$1,2) 1 | echo -a Added $$1 To Voice list on $chan with this host: $address($$1,2) | mode $chan +v $$1
  142.   ..KeepOp:writeini $+(database\,$chan,.ini) keepop $address($$1,2) 1 | echo -a Added $$1 To KeepOp list on $chan with this host: $address($$1,2) | mode $chan +o $$1
  143.   ..Protect:writeini $+(database\,$chan,.ini) protect $address($$1,2) 1 | echo -a Added $$1 To protect list on $chan with this host: $address($$1,2)
  144.   ..Bot:writeini $+(database\,$chan,.ini) bot $address($$1,2) 1 | echo -a Added $$1 To Bot list on $chan with this host: $address($$1,2)
  145.   .Remove
  146.   ..ChanBot:remini $+(database\,$chan,.ini) chanbot $address($$1,2) | echo -a Removed $$1 From ChanBot list on $chan with this host: $address($$1,2) | mode $chan -o $$1
  147.   ..Op:remini $+(database\,$chan,.ini) opjoin $address($$1,2) | echo -a Removed $$1 From Op list on $chan with this host: $address($$1,2) | mode $chan -o $$1
  148.   ..Voice:remini $+(database\,$chan,.ini) voicejoin $address($$1,2) | echo -a Removed $$1 From Voice list on $chan with this host: $address($$1,2) | mode $chan -v $$1  
  149.   ..KeepOp:remini $+(database\,$chan,.ini) KeepOp $address($$1,2) 1 | echo -a Removed $$1 From KeepOp list on $chan with this host: $address($$1,2)
  150.   ..Protect:remini $+(database\,$chan,.ini) protect $address($$1,2) 1 | echo -a Removed $$1 From protect list on $chan with this host: $address($$1,2)
  151.   ..Bot:remini $+(database\,$chan,.ini) bot $address($$1,2) 1 | echo -a Removed $$1 From Bot list on $chan with this host: $address($$1,2)
  152. }
  153.  
  154. on *:LOAD:{ echo -a Userlist v3.1+client Succesfully loaded | mkdir database }
RAW Paste Data
Top