on *:LOAD:{ ;checks to see if your version is 6.1 or higher if ($version < 6.1) { echo -a - echo -a Error, script not loaded: echo -a You need mIRC version 6.1 or higher in order for this script to work. echo -a Your current version is $version $+ . echo -a - ;unloads script if version is lower than 6.1 unload -rs $+(",$script,") echo -a Script successfully unloaded. echo -a - } else { echo -a - echo -a You have just loaded Channel Service Bot. echo -a Made by CrAzY_cAfCaSi set %version 3.1c set %built.on January 28, 2003, 5:06:12 PM echo -a Channel Service Bot Version %version $+ . Built on %built.on $+ . echo -a - ;this sets the bot trigger so it will be %trigger $+ command set %trigger $$?="Please select the bot's trigger. You may change it later. (eg. ! ? . @ -)" echo -a Set global trigger to ' $+ %trigger $+ '. echo -a - } } on *:UNLOAD:{ echo -a - echo -a Thanks for using Channel Service Bot! echo -a - var %del.don = [ $input(Would you like to delete the databases?,y) ] if (%del.don == $true) { var %i = 1 while (%i <= $findfile($scriptdir,*,0) { if ($findfile($scriptdir,*,%i) != bot.mrc) && ($findfile($scriptdir,*,%i) != 8ball.txt) && ($findfile($scriptdir,*,%i) != "Channel Service Bot readme.txt") { remove ($findfile($scriptdir,*,%i) } inc %i } } unset %trigger, %built.on, %version, %dynlimit.* echo -a You have just unloaded Channel Services Bot. echo -a - } on *:CONNECT:{ ;this while loop checks to see the perform list var %i = 1 while (%i <= $lines(" $+ $scriptdirbotperform.txt")) { .timerperform $+ %i 1 $calc(%i + 1) $read(" $+ $scriptdirbotperform.txt",%i) inc %i } } on *:OPEN:?:{ close -m } on *:join:#:{ if ($nick == $me) { who $chan } else { if ($channels($chan) != $null) { ;this checks to see if the person joining the channel is on the banlist, if so, it bans them var %i = 1, %x = 0 while (%i <= 9) && (%x <= $ini(" $+ $scriptdirchannels.ini",$chan $+ blist,0)) { if ($gettok($readalltheini(" $+ $scriptdirchannels.ini",$chan $+ blist,*),%x,32) iswm $address($nick,%i)) { ban -k $chan $ifmatch $gettok($readini(" $+ $scriptdirchannels.ini",$chan $+ blist,$ifmatch),3-,32) } inc %i inc %x } if ($authed($nick) == 1) { ;checks to see if the person joining the chanel has any access to the channel if ($access($chan,$nick) == Owner) || ($access($chan,$nick) == Coowner) || ($access($chan,$nick) == Master) || ($access($chan,$nick) == Op) { mode $chan +o $nick $iif($readini(" $+ $scriptdirchannels.ini",$chan $+ setinfo,$account($nick)) != $null,msg $chan $chr(91) $+ $nick $+ $chr(93) $parse.from.ini($readini(" $+ $scriptdirchannels.ini",$chan $+ setinfo,$account($nick)))) writeini " $+ $scriptdirchannels.ini" $chan $+ host $wildsite $access($chan,$nick) if ($readini(" $+ $scriptdirchannels.ini",$chan,UserGreeting) != None) { .notice $nick $parse.from.ini($readini(" $+ $scriptdirchannels.ini",$chan,UserGreeting)) } elseif ($readini(" $+ $scriptdirchannels.ini",$chan,UserGreeting) == None) && ($readini(" $+ $scriptdirchannels.ini",$chan,Greeting) != None) { .notice $nick $parse.from.ini($readini(" $+ $scriptdirchannels.ini",$chan,Greeting)) } } elseif ($access($chan,$nick) == Peon) { mode $chan +v $nick $iif($readini(" $+ $scriptdirchannels.ini",$chan $+ setinfo,$account($nick)) != $null,msg $chan $chr(91) $+ $nick $+ $chr(93) $parse.from.ini($readini(" $+ $scriptdirchannels.ini",$chan $+ setinfo,$account($nick)))) writeini " $+ $scriptdirchannels.ini" $chan $+ host $wildsite $access($chan,$nick) if ($readini(" $+ $scriptdirchannels.ini",$chan,UserGreeting) != None) { .notice $nick $parse.from.ini($readini(" $+ $scriptdirchannels.ini",$chan,UserGreeting)) } elseif ($readini(" $+ $scriptdirchannels.ini",$chan,UserGreeting) == None) && ($readini(" $+ $scriptdirchannels.ini",$chan,Greeting) != None) { .notice $nick $parse.from.ini($readini(" $+ $scriptdirchannels.ini",$chan,Greeting)) } } else { if ($readini(" $+ $scriptdirchannels.ini",$chan,Voice) == Enabled) { mode $chan +v $nick } if ($readini(" $+ $scriptdirchannels.ini",$chan,Greeting) != None) { .notice $nick $parse.from.ini($readini(" $+ $scriptdirchannels.ini",$chan,Greeting)) } } } else { if ($readini(" $+ $scriptdirchannels.ini",$chan,Voice) == Enabled) { mode $chan +v $nick } if ($readini(" $+ $scriptdirchannels.ini",$chan,Greeting) != None) { .notice $nick $parse.from.ini($readini(" $+ $scriptdirchannels.ini",$chan,Greeting)) } } } } } on *:START:{ ;resets everyones auth to 0 (security reasons) var %i = 1 while (%i <= $ini(" $+ $scriptdiraccounts.ini",Authed,0)) { writeini " $+ $scriptdiraccounts.ini" Authed $ini(" $+ $scriptdiraccounts.ini",Authed,%i) 0 inc %i } var %x = 1 while (%x <= $ini(" $+ $scriptdiropers.ini",Opers,0)) { writeini " $+ $scriptdiropers.ini" Opers $ini(" $+ $scriptdiropers.ini",Opers,%x) 0 inc %x } var %f = 1 while (%f <= $ini(" $+ $scriptdiropers.ini",Helpers,0)) { writeini " $+ $scriptdiropers.ini" Helpers $ini(" $+ $scriptdiropers.ini",Helpers,%f) 0 inc %f } } on *:MODE:#:{ if ($channels($chan) != $null) { if ($nick != $me) { ;checks to see if the modes conflict with the channel set modes, if so it puts them back if ($readini(" $+ $scriptdirchannels.ini",$chan,Modes) != None) { $restoremodes2($chan,$nick) } } } } on ^*:NOTICE:*:?:{ haltdef } on *:nick:{ if ($authed($nick) == 1) { ;when someone changes their nick, it adds their new nick to the " $+ $scriptdiraccounts.ini" and removes their old one var %i = 1, %account = $readini(" $+ $scriptdiraccounts.ini",Nicks,$nick), %hostmask = $readini(" $+ $scriptdiraccounts.ini",%account,Hostmask) while (%i <= $ini(" $+ $scriptdirchannels.ini",0)) { if ($readini(" $+ $scriptdirchannels.ini",$ini(" $+ $scriptdirchannels.ini",%i),%hostmask) != $null) { remini " $+ $scriptdirchannels.ini" $ini(" $+ $scriptdirchannels.ini",%i) %hostmask writeini " $+ $scriptdirchannels.ini" $ini(" $+ $scriptdirchannels.ini",%i) $address($newnick,5) $ifmatch } inc %i } var %account = $readini(" $+ $scriptdiraccounts.ini",Nicks,$nick) var %password = $readini(" $+ $scriptdiraccounts.ini",Passwords,$nick) writeini " $+ $scriptdiraccounts.ini" Authed $newnick 1 writeini " $+ $scriptdiraccounts.ini" Nicks $newnick %account writeini " $+ $scriptdiraccounts.ini" Accounts %account $newnick writeini " $+ $scriptdiraccounts.ini" %account Nick $newnick writeini " $+ $scriptdiraccounts.ini" %account Hostmask $address($newnick,5) writeini " $+ $scriptdiraccounts.ini" Passwords $newnick %password remini " $+ $scriptdiraccounts.ini" Authed $nick remini " $+ $scriptdiraccounts.ini" Nicks $nick remini " $+ $scriptdiraccounts.ini" Passwords $nick } } on *:kick:#:{ if ($channels($chan) != $null) { if ($nick != $me) { ;when someone is kicked, it checks whether the person being kicked is protected if ($protection($chan) == 2) { if ($knick == $me) { join $chan if ($me !isop $chan) { msg $chan Possible channel takeover by $nick $+ . (I need OP's to function properly.) | halt } elseif ($me isop $chan) { msg $chan Possible channel takeover by $nick $+ . | halt } } if ($authed($knick) == 1) { if ($access($chan,$nick).level != 0) && ($access($chan,$knick).level != 0) { if ($access($chan,$nick).level <= $access($chan,$knick).level) { mode $chan -o $nick kick $chan $nick Sorry, that user is protected. } } } } elseif ($protection($chan) == 1) { if ($knick == $me) { join $chan if ($me !isop $chan) { msg $chan Possible channel takeover by $nick $+ . (I need OP's to function properly.) | halt } elseif ($me isop $chan) { msg $chan Possible channel takeover by $nick $+ . | halt } } if ($authed($knick) == 1) { if ($access($chan,$nick).level != 0) && ($access($chan,$knick).level != 0) { if ($access($chan,$nick).level < $access($chan,$knick).level) { mode $chan -o $nick kick $chan $nick Sorry, that user is protected. } } } } elseif ($protection($chan) == 0) { if ($knick == $me) { join $chan if ($me !isop $chan) { msg $chan Possible channel takeover by $nick $+ . (I need OP's to function properly.) | halt } elseif ($me isop $chan) { msg $chan Possible channel takeover by $nick $+ . | halt } } return } } } } on *:deop:#:{ if ($channels($chan) != $null) { if ($nick != $me) { ;when someone is deopped, it checks whether the person being deopped is protected if ($protection($chan) == 2) { if ($opnick == $me) { msg $chan Possible channel takeover by $nick $+ . (I need OP's to function properly.) | halt } if ($authed($opnick) == 1) { if ($access($chan,$nick).level != 0) && ($access($chan,$opnick).level != 0) { if ($access($chan,$nick).level <= $access($chan,$opnick).level) { mode $chan -o+o $nick $opnick .notice $nick Sorry,  $+ $opnick $+  is protected. } } } } elseif ($protection($chan) == 1) { if ($opnick == $me) { msg $chan Possible channel takeover by $nick $+ . (I need OP's to function properly.) | halt } if ($authed($opnick) == 1) { if ($access($chan,$nick).level != 0) && ($access($chan,$opnick).level != 0) { if ($access($chan,$nick).level < $access($chan,$opnick).level) { mode $chan -o+o $nick $opnick .notice $nick Sorry,  $+ $opnick $+  is protected. } } } } elseif ($protection($chan) == 0) { if ($opnick == $me) { msg $chan Possible channel takeover by $nick $+ . (I need OP's to function properly.) | halt } return } } } } on *:ban:#:{ if ($channels($chan) != $null) { if ($nick != $me) { .timerbancheck 0 15 bancheck ;when someone/a mask is banned, it checks whether the hostmask conflicts with any protected hostmasks if ($protection($chan) == 2) { if ($banmask iswm $address($me,2)) { mode $chan -ob $nick $banmask msg $chan Possible channel takeover by $nick $+ . | halt } if ($access($chan,$nick).level != 0) && ($access($chan,$banmask).level != 0) { if ($access($chan,$nick).level <= $access($chan,$banmask).levelhost) { mode $chan -b $banmask .notice $nick Sorry, ban for  $+ $banmask $+  conflicts with a protected user's hostmask. | halt } } } elseif ($protection($chan) == 1) { if ($banmask iswm $address($me,2)) { mode $chan -ob $nick $banmask msg $chan Possible channel takeover by $nick $+ . | halt } if ($access($chan,$nick).level != 0) && ($access($chan,$banmask).level != 0) { if ($access($chan,$nick).level < $access($chan,$banmask).levelhost) { mode $chan -b $banmask .notice $nick Sorry, ban for  $+ $banmask $+  conflicts with a protected user's hostmask. | halt } } } elseif ($protection($chan) == 0) { if ($banmask iswm $address($me,2)) { mode $chan -ob $nick $banmask msg $chan Possible channel takeover by $nick $+ . | halt } return } } } } on *:TOPIC:#:{ if ($channels($chan) != $null) { if ($nick != $me) { if ($calc($access($chan,$nick).level - 1) >= $enftopic($chan)) { halt } else { .notice $nick The $chan topic is locked. $iif($readini(" $+ $scriptdirchannels.ini",$chan,DefaultTopic) != None,topic $chan $ifmatch) } } } } on *:DISCONNECT:{ ;resets everyones auth to 0 (security reasons) var %i = 1 while (%i <= $ini(" $+ $scriptdiraccounts.ini",Authed,0)) { writeini " $+ $scriptdiraccounts.ini" Authed $ini(" $+ $scriptdiraccounts.ini",Authed,%i) 0 inc %i } var %x = 1 while (%x <= $ini(" $+ $scriptdiropers.ini",Opers,0)) { writeini " $+ $scriptdiropers.ini" Opers $ini(" $+ $scriptdiropers.ini",Opers,%x) 0 inc %x } var %f = 1 while (%f <= $ini(" $+ $scriptdiropers.ini",Helpers,0)) { writeini " $+ $scriptdiropers.ini" Helpers $ini(" $+ $scriptdiropers.ini",Helpers,%f) 0 inc %f } } on *:QUIT:{ .timerbancheck 0 15 bancheck ;unauths the person who quit if ($authed($nick) == 1) { writeini " $+ $scriptdiraccounts.ini" Authed $nick 0 } if ($oper($nick) == 1) { writeini " $+ $scriptdiropers.ini" Opers $account($nick) 0 } elseif ($helper($nick) == 1) { writeini " $+ $scriptdiropers.ini" Helpers $account($nick) 0 } if ($nick == $me) { ;resets everyones auth to 0 (security reasons) var %i = 1 while (%i <= $ini(" $+ $scriptdiraccounts.ini",Authed,0)) { writeini " $+ $scriptdiraccounts.ini" Authed $ini(" $+ $scriptdiraccounts.ini",Authed,%i) 0 inc %i } var %x = 1 while (%x <= $ini(" $+ $scriptdiropers.ini",Opers,0)) { writeini " $+ $scriptdiropers.ini" Opers $ini(" $+ $scriptdiropers.ini",Opers,%x) 0 inc %x } var %f = 1 while (%f <= $ini(" $+ $scriptdiropers.ini",Helpers,0)) { writeini " $+ $scriptdiropers.ini" Helpers $ini(" $+ $scriptdiropers.ini",Helpers,%f) 0 inc %f } } } ;on text for private messages on *:TEXT:*:?:{ .timerbancheck 0 15 bancheck $bot.commands($1,$2,$3,$4,$5-).inpm } ;on text for channel messages on *:TEXT:*:#:{ .timerbancheck 0 15 bancheck if ($channels($chan) != $null) { $protectfromspam($nick,$chan) } if ($left($1,1) == %trigger) { tokenize 32 $right($1,-1) $2- $bot.commands($1,$2,$3,$4,$5-).inchan } } ;;;;;;;;USE: $bot.commands(commands|channel)(.inchan | .inpm) alias -l bot.commands { if ($prop == inchan) { if ($1 == join) || ($1 == j) || ($1 == part) || ($1 == p) { var %com = $1, %rest = $2- } elseif ($left($1,1) == $chr(35)) { var %chan = $1, %com = $2, %rest = $3- } elseif ($left($2,1) == $chr(35)) { var %com = $1, %chan = $2, %rest = $3- } else { var %chan = $chan, %com = $1, %rest = $2- } } elseif ($prop == inpm) { if (sex* iswm $1) || (unf* iswm $1) || (banana* iswm $1) || (boner* iswm $1) || (penis* iswm $1) || ($1 == age) || (date* iswm $1) || (time* iswm $1) || ($1 == calc) || ($1 == calculator) || ($1 == 8ball) || ($1 == 8) || (help* iswm $1) || (version* iswm $1) || (credit* iswm $1) || (ping* iswm $1) || ($1 == god) || ($1 == addhelper) || ($1 == delhelper) || ($1 == helpers) || ($1 == opers) || ($1 == staff) || ($1 == reg) || ($1 == register) || ($1 == unreg) || ($1 == unregister) || ($1 == pass) || ($1 == auth) || ($1 == authenticate) || ($1 == ounreg) || ($1 == ounregister) || ($2 == trigger) || ($1 == join) || ($1 == j) || ($1 == part) || ($1 == p) || ($1 == allowauth) || ($1 == aa) || ($1 == rename) || ($1 == gag) || ($1 == ignore) || ($1 == ungag) || ($1 == unignore) || ($1 == gags) || ($1 == gaglist) { var %com = $1, %rest = $2- } elseif (cc* iswm $1) || (crazy*cafcasi iswm $1) || ($1 == ignores) || ($1 == ignorelist) || ($1 == addperform) || ($1 == delperform) || ($1 == performs) || ($1 == performlist) || ($1 == dice) || ($1 == d) || ($1 == quit) || ($1 == disconnect) || ($1 == shutdown) || ($1 == trans) || ($1 == translation) { var %com = $1, %rest = $2- } elseif ($left($1,1) == $chr(35)) { var %chan = $1, %com = $2, %rest = $3- } elseif ($left($2,1) == $chr(35)) { var %com = $1, %chan = $2, %rest = $3- } else { .notice $nick You must provide a channel. | halt } } tokenize 32 %rest ;checks to see if commands requiring a password are done in PM if (%com == register) || (%com == reg) || (%com == unregister) || (%com == unreg) || (%com == pass) || (%com == auth) || (%com == authenticate) && ($prop == inchan) { .notice $nick This command must be done in PM only. | halt } ;this command is to register an account, syntax: REGISTER elseif (%com == register) || (%com == reg) { if ($authed($nick) == 1) { .notice $nick You are already authed with  $+ $me $+ . Disconnect to register another account. | halt } if ($readini(" $+ $scriptdiraccounts.ini",Accounts,$1)) { .notice $nick Account  $+ $1 $+  is already registered. | halt } if (!$1) { .notice $nick  $+ %com $+  requires more parameters. (account and pass) | halt } elseif (!$2) { .notice $nick  $+ %com $+  requires more parameters. (pass) | halt } if ($1 == pass) || ($1 == account) || ($1 == $me) { .notice $nick Your account name cannot be 'PASS' 'ACCOUNT' or ' $+ $me $+ '. } else { ;writes all necessary info to " $+ $scriptdiraccounts.ini" writeini " $+ $scriptdiraccounts.ini" Nicks $nick $1 writeini " $+ $scriptdiraccounts.ini" Accounts $1 $nick writeini " $+ $scriptdiraccounts.ini" $1 Nick $nick writeini " $+ $scriptdiraccounts.ini" $1 Hostmask $wildsite writeini " $+ $scriptdiraccounts.ini" Passwords $nick $encode($2,m) writeini " $+ $scriptdiraccounts.ini" Authed $nick 1 .notice $nick Account  $+ $1 $+  has been registered to you. } } ;this command is to unregister an account you are authed to, syntax: UNREGISTER elseif (%com == unregister) || (%com == unreg) { if ($authed($nick) == 1) { if (!$1) { .notice $nick  $+ %com $+  requires more parameters. (pass) } if ($encode($1,m) === $password($nick)) { var %i = 1 while (%i <= $ini(" $+ $scriptdirchannels.ini",0)) { if ($access($ini(" $+ $scriptdirchannels.ini",%i),$nick)) { remini " $+ $scriptdirchannels.ini" $ini(" $+ $scriptdirchannels.ini",%i) $account($nick) remini " $+ $scriptdirchannels.ini" $ini(" $+ $scriptdirchannels.ini",%i) $wildsite } inc %i } var %account $account($nick) if ($oper($nick) != $null) { remini " $+ $scriptdiropers.ini" Opers $account($nick) } if ($helper($nick) != $null) { remini " $+ $scriptdiropers.ini" Helpers $account($nick) } remini " $+ $scriptdiraccounts.ini" Accounts $account($nick) remini " $+ $scriptdiraccounts.ini" $account($nick) remini " $+ $scriptdiraccounts.ini" Passwords $nick remini " $+ $scriptdiraccounts.ini" Authed $nick remini " $+ $scriptdiraccounts.ini" Nicks $nick .notice $nick Successfully unregistered account  $+ %account $+ . } else { .notice $nick Invalid password for account  $+ $account($nick) $+ . (Case Sensitive) } } else { .notice $nick You are not authed with  $+ $me $+ . } } ;this command is to change an accounts password that you are authed on, syntax: PASS elseif (%com == pass) { if ($authed($nick) == 1) { if (!$1) { .notice $nick pass requires more parameters. (oldpass and newpass) } elseif (!$2) { .notice $nick pass requires more parameters. (newpass) } if ($encode($1,m) === $password($nick)) { writeini " $+ $scriptdiraccounts.ini" Passwords $nick $encode($2,m) .notice $nick Password successfully changed to  $+ $2 $+ . } else { .notice $nick Invalid password for account  $+ $account($nick) $+ . (Case Sensitive) } } else { .notice $nick You must first auth with  $+ $me $+ . } } ;this command is to auth to an account, syntax: AUTH elseif (%com == auth) || (%com == authenticate) { if ($authed($nick) == 1) { .notice $nick You already authed with  $+ $me $+ . | halt } if (!$1) { .notice $nick  $+ %com $+  requires more parameters. (account and pass) | halt } if (!$readini(" $+ $scriptdiraccounts.ini",Accounts,$1)) { .notice $nick Account  $+ $1 $+  has not been registered with  $+ $me $+ . | halt } elseif (!$2) { .notice $nick  $+ %com $+  requires more parameters. (pass) | halt } var %account.nick = $readini(" $+ $scriptdiraccounts.ini",Accounts,$1) var %account = $readini(" $+ $scriptdiraccounts.ini",Nicks,%account.nick) if ($authed(%account.nick) == 0) || ($authed(%account.nick) == $null) { if ($address($nick,3) iswm $readini(" $+ $scriptdiraccounts.ini",$1,Hostmask)) || ($address($nick,2) iswm $readini(" $+ $scriptdiraccounts.ini",$1,Hostmask)) { if ($1 == %account) && ($encode($2,m) === $password(%account.nick)) { var %i = 1, %hostmask = $readini(" $+ $scriptdiraccounts.ini",$1,Hostmask) while (%i <= $ini(" $+ $scriptdirchannels.ini",0)) { if ($readini(" $+ $scriptdirchannels.ini",$ini(" $+ $scriptdirchannels.ini",%i),%hostmask) != $null) { remini " $+ $scriptdirchannels.ini" $ini(" $+ $scriptdirchannels.ini",%i) %hostmask writeini " $+ $scriptdirchannels.ini" $ini(" $+ $scriptdirchannels.ini",%i) $wildsite $ifmatch } inc %i } ;writes/changer any necessary info needed remini " $+ $scriptdiraccounts.ini" Nicks %account.nick writeini " $+ $scriptdiraccounts.ini" Nicks $nick $1 remini " $+ $scriptdiraccounts.ini" Authed %account.nick writeini " $+ $scriptdiraccounts.ini" Authed $nick 1 writeini " $+ $scriptdiraccounts.ini" %account Hostmask $wildsite writeini " $+ $scriptdiraccounts.ini" %account Nick $nick remini " $+ $scriptdiraccounts.ini" Passwords %account.nick writeini " $+ $scriptdiraccounts.ini" Passwords $nick $encode($2,m) remini " $+ $scriptdiraccounts.ini" Accounts %account writeini " $+ $scriptdiraccounts.ini" Accounts %account $nick var %i = 1 var %accesschan = $ini(" $+ $scriptdirchannels.ini",0) while (%i <= %accesschan) { if (*host !iswm $ini(" $+ $scriptdirchannels.ini",%i)) && (*blist !iswm $ini(" $+ $scriptdirchannels.ini",%i)) && (*setinfo !iswm $ini(" $+ $scriptdirchannels.ini",%i)) { var %channel.from.ini = $ini(" $+ $scriptdirchannels.ini",%i) } if ($access(%channel.from.ini,$nick) == peon) { mode %channel.from.ini +v $nick } elseif ($access(%channel.from.ini,$nick).level <= 5) { mode %channel.from.ini +o $nick } inc %i } .notice $nick You have successfully authed with  $+ $me $+ . } else { .notice $nick Invalid password for account  $+ $1 $+ . (Case Sensitive) } } else { .notice $nick Invalid hostmask for account  $+ $1 $+ . } } else { .notice $nick You are already authed with  $+ $me $+ . } } ;this command is to unregister someone's account, syntax: OUNREGISTER elseif (%com == ounreg) || (%com == ounregister) { if ($authed($nick) == 1) { if ($godstatus($nick) == 1) { if (!$1) { .notice $nick  $+ %com $+  requires more parameters. (nick|*account) | halt } if ($mid($1,1,1) == $chr(42)) { var %account.nick = $readini(" $+ $scriptdiraccounts.ini",Accounts,$remove($1,*)) var %account.hostmask = $readini(" $+ $scriptdiraccounts.ini",$account(%account.nick),Hostmask) if (!$readini(" $+ $scriptdiraccounts.ini",Accounts,$remove($1,*))) { .notice $nick Account  $+ $remove($1,*) $+  has not been registered with  $+ $me $+ . | halt } } else { var %account.nick = $1 var %account.hostmask = $address($1,5) if ($authed($1) == 0) { .notice $nick $1 must first auth with  $+ $me $+ . | halt } } var %i = 1 while (%i <= $ini(" $+ $scriptdirchannels.ini",0)) { if ($access($ini(" $+ $scriptdirchannels.ini",%i),%account.nick)) { remini " $+ $scriptdirchannels.ini" $ini(" $+ $scriptdirchannels.ini",%i) $account(%account.nick) remini " $+ $scriptdirchannels.ini" $ini(" $+ $scriptdirchannels.ini",%i) %account.host } inc %i } var %account = $account(%account.nick) if ($oper(%account.nick) != $null) { remini " $+ $scriptdiropers.ini" Opers $account(%account.nick) } if ($helper(%account.nick) != $null) { remini " $+ $scriptdiropers.ini" Helpers $account(%account.nick) } remini " $+ $scriptdiraccounts.ini" Accounts $account(%account.nick) remini " $+ $scriptdiraccounts.ini" $account(%account.nick) remini " $+ $scriptdiraccounts.ini" Passwords %account.nick remini " $+ $scriptdiraccounts.ini" Authed %account.nick remini " $+ $scriptdiraccounts.ini" Nicks %account.nick .notice $nick Successfully unregistered account  $+ %account $+ . } else { .notice $nick You must have security override (helping mode) on to use this command. } } else { .notice $nick You are not authed with  $+ $me $+ . } } ;this command is to allow someone to auth to an account they have an invalid hostmask on, ;syntax: ALLOWAUTH elseif (%com == allowauth) || (%com == aa) { if ($authed($nick) == 1) { if ($godstatus($nick) == 1) { $allowauth($nick,$1,$2) } else { .notice $nick You must have security override (helping mode) on to use this command. } } else { .notice $nick You must first auth with  $+ $me $+ . } } ;this command is to rename someone's account name, syntax: RENAME <[*]new-account> elseif (%com == rename) { if ($authed($nick) == 1) { if ($godstatus($nick) == 1) { $renameaccount($nick,$1,$2) } else { .notice $nick You must have security override (helping mode) on to use this command. } } else { .notice $nick You must first auth with  $+ $me $+ . } } ;this command unauths someone, syntax: UNAUTH [nick] elseif (%com == unauth) || (%com == deauth) { if ($authed($nick) == 1) { if (!$1) { .notice $nick You must add CONFIRM to the end of your line to confirm unauthorization. } elseif ($1 == CONFIRM) { writeini " $+ $scriptdiraccounts.ini" Authed $nick 0 .notice $nick You have unauthed from  $+ $me $+ . } else { if ($godstatus($nick) == 1) { if ($authed($1) == 1) { writeini " $+ $scriptdiraccounts.ini" Authed $1 0 .notice $nick  $+ $1 $+  has been unauthed from  $+ $me $+ . } else { .notice $nick  $+ $1 $+  isn't authed with  $+ $me $+ . } } else { .notice $nick You must have security override (helping mode) on to use this command. } } } else { .notice $nick You must first auth with  $+ $me $+ . } } ;registers a channel with the bot, syntax: REGCHAN <#channel> elseif (%com == registerchannel) || (%com == registerchan) || (%com == regchannel) || (%com == regchan) || (%com == channelregister) || (%com == chanregister) || (%com == channelreg) || (%com == chanreg) { if ($authed($nick) == 1) { if ($godstatus($nick) == 1) { if (!$1) { .notice $nick  $+ %com $+  requires more parameters. | halt } if ($channels(%chan) != $null) { .notice $nick  $+ %chan $+  is registered to someone else. | halt } if ($1 == $me) { .notice $nick  $+ $me $+  is a channel service bot; you can only use that command on real users. | halt } if ($mid($1,1,1) == $chr(42)) { var %account.nick = $readini(" $+ $scriptdiraccounts.ini",Accounts,$remove($1,*)) var %account.host = $readini(" $+ $scriptdiraccounts.ini",$account(%account.nick),Hostmask) if (!$readini(" $+ $scriptdiraccounts.ini",Accounts,$remove($1,*))) { .notice $nick Account  $+ $remove($1,*) $+  has not been registered with  $+ $me $+ . | halt } else { ;writes all the channel info to the " $+ $scriptdirchannels.ini" writeini " $+ $scriptdirchannels.ini" %chan %chan $asctime writeini " $+ $scriptdirchannels.ini" %chan Registrar $account($nick) writeini " $+ $scriptdirchannels.ini" %chan $account(%account.nick) owner writeini " $+ $scriptdirchannels.ini" %chan $+ host %account.host owner writeini " $+ $scriptdirchannels.ini" %chan Setters Masters writeini " $+ $scriptdirchannels.ini" %chan Modes None writeini " $+ $scriptdirchannels.ini" %chan Toys 2 writeini " $+ $scriptdirchannels.ini" %chan Dynlimit Disabled writeini " $+ $scriptdirchannels.ini" %chan Voice Disabled writeini " $+ $scriptdirchannels.ini" %chan SpamProtect Disabled writeini " $+ $scriptdirchannels.ini" %chan SpamPunish kick writeini " $+ $scriptdirchannels.ini" %chan Protect 2 writeini " $+ $scriptdirchannels.ini" %chan DefaultTopic None writeini " $+ $scriptdirchannels.ini" %chan EnfTopic 0 writeini " $+ $scriptdirchannels.ini" %chan Greeting None writeini " $+ $scriptdirchannels.ini" %chan UserGreeting None writeini " $+ $scriptdirchannels.ini" %chan NoDelete Disabled write " $+ $scriptdirbotperform.txt" join %chan join %chan mode %chan +nt .notice $nick Successfully registered  $+ %chan $+  to $account(%account.nick) $+ . } } else { if ($authed($1) == 1) { writeini " $+ $scriptdirchannels.ini" %chan %chan $asctime writeini " $+ $scriptdirchannels.ini" %chan Registrar $account($nick) writeini " $+ $scriptdirchannels.ini" %chan $account($1) owner writeini " $+ $scriptdirchannels.ini" %chan $+ host $address($1,5) owner writeini " $+ $scriptdirchannels.ini" %chan Setters Masters writeini " $+ $scriptdirchannels.ini" %chan Modes None writeini " $+ $scriptdirchannels.ini" %chan Toys 2 writeini " $+ $scriptdirchannels.ini" %chan Dynlimit Disabled writeini " $+ $scriptdirchannels.ini" %chan Voice Disabled writeini " $+ $scriptdirchannels.ini" %chan SpamProtect Disabled writeini " $+ $scriptdirchannels.ini" %chan SpamPunish kick writeini " $+ $scriptdirchannels.ini" %chan Protect 2 writeini " $+ $scriptdirchannels.ini" %chan DefaultTopic None writeini " $+ $scriptdirchannels.ini" %chan EnfTopic 0 writeini " $+ $scriptdirchannels.ini" %chan Greeting None writeini " $+ $scriptdirchannels.ini" %chan UserGreeting None writeini " $+ $scriptdirchannels.ini" %chan NoDelete Disabled write " $+ $scriptdirbotperform.txt" join %chan join %chan mode %chan +nt .notice $nick Successfully registered  $+ %chan $+  to $1 ( $+ $account($1) $+ ). } else { .notice $nick $1 must first auth with  $+ $me $+ . } } } else { .notice $nick You must have security override (helping mode) on to use this command. } } else { .notice $nick You must first auth with  $+ $me $+ . } } ;unregisters a registered channel with the bot, syntax: UNREGCHAN <#channel> elseif (%com == unregisterchannel) || (%com == unregisterchan) || (%com == unregchannel) || (%com == unregchan) || (%com == channelunregister) || (%com == chanunregister) || (%com == channelunreg) || (%com == chanunreg) { if ($channels(%chan) != $null) { if ($authed($nick) == 1) { if (!$1) { if ($godstatus($nick) == 1) { if ($nodelete(%chan) == Enabled) { .notice $nick  $+ %chan $+  is protected from unregistration. (NoDelete) | halt } ;removes all info the channel had remini " $+ $scriptdirchannels.ini" %chan remini " $+ $scriptdirchannels.ini" %chan $+ host remini " $+ $scriptdirchannels.ini" %chan $+ blist remini " $+ $scriptdirchannels.ini" %chan $+ setinfo $iif($isfile(" $+ $scriptdir $+ %chan $+ quote.txt") == $true,remove " $+ $scriptdir $+ %chan $+ quote.txt") write -dw $+ "join %chan $+ " " $+ $scriptdirbotperform.txt" part %chan Channel unregistered by $nick $+ . $iif(%dynlimit. [ $+ [ %chan ] ],unset %dynlimit. [ $+ [ %chan ] ]) .notice $nick Successfully unregistered  $+ %chan $+ . } elseif ($access(%chan,$nick) == Owner) { if ($nodelete(%chan) == Enabled) { .notice $nick  $+ %chan $+  is protected from unregistration. (NoDelete) | halt } .notice $nick To confirm this unregistration, you must append 'CONFIRM' to the end of your command. } elseif ($access(%chan,$nick) != Owner) { .notice $nick You lack sufficient access in %chan to use this command. } else { .notice $nick You lack access to %chan $+ . } } elseif ($1 == CONFIRM) { if ($access(%chan,$nick) == Owner) || ($godstatus($nick) == 1) { remini " $+ $scriptdirchannels.ini" %chan remini " $+ $scriptdirchannels.ini" %chan $+ host remini " $+ $scriptdirchannels.ini" %chan $+ blist remini " $+ $scriptdirchannels.ini" %chan $+ setinfo $iif($isfile(" $+ $scriptdir $+ %chan $+ quote.txt") == $true,remove " $+ $scriptdir $+ %chan $+ quote.txt") write -dw $+ "join %chan $+ " " $+ $scriptdirbotperform.txt" part %chan Channel unregistered by $nick $+ . .notice $nick Successfully unregistered  $+ %chan $+ . } elseif ($access(%chan,$nick) != Owner) { .notice $nick You lack sufficient access in %chan to use this command. } else { .notice $nick You lack access to %chan $+ . } } } else { .notice $nick You must first auth with  $+ $me $+ . } } else { .notice $nick  $+ %chan $+  has not been registered with  $+ $me $+ . } } ;moves a channels userlist, banlist, info to another channl, syntax: MOVE <#channe> elseif (%com == move) { if ($authed($nick) == 1) { if ($godstatus($nick) == 1) { if ($channels(%chan) != $null) { if (!%chan) { .notice $nick move requires more parameters. (channel and destination) | halt } elseif (!$1) { .notice $nick move requires more parameters. (destination) | halt } if ($channels($1) != $null) { .notice $nick  $+ $1 $+  is registered to someone else. | halt } if ($left($1,1) != $chr(35)) { .notice $nick That is not a valid channel. | halt } else { $initopicchanger(" $+ $scriptdirchannels.ini",%chan,$1) $initopicchanger(" $+ $scriptdirchannels.ini",%chan $+ host,$1 $+ host) $initopicchanger(" $+ $scriptdirchannels.ini",%chan $+ blist,$1 $+ blist) $initopicchanger(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$1 $+ setinfo) write -ds $+ "join %chan" " $+ $scriptdirbotperform.txt" write " $+ $scriptdirbotperform.txt" join $1 part %chan Channel moved to $1 $+ . join $1 mode $1 $readini(" $+ $scriptdirchannels.ini",$1,Modes) .notice $nick Channel registration moved from  $+ %chan $+  to  $+ $1 $+ . } } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } else { .notice $nick You must have security override (helping mode) on to use this command. } } else { .notice $nick You must first auth with  $+ $me $+ . } } ;toggle godmode (security override) for helpers and opers, syntax: GOD [on|off] elseif (%com == god) || (%com == h4x) { if ($authed($nick) == 1) { if ($oper($nick) != $null) || ($helper($nick) != $null) { var %helper.or.oper = $iif($helper($nick) != $null,Helpers,Opers) if ($1 == on) || ($1 == 1) || ($1 == Enable) { if ($godstatus($nick) == 1) { .notice $nick Security override is already enabled. | halt } writeini " $+ $scriptdiropers.ini" %helper.or.oper $account($nick) 1 .notice $nick Security override has been enabled. } elseif ($1 == off) || ($1 == 0) || ($1 == Disable) { if ($godstatus($nick) == 0) { .notice $nick Security override is already disabled. | halt } writeini " $+ $scriptdiropers.ini" %helper.or.oper $account($nick) 0 .notice $nick Security override has been disabled. } else { var %god.status = $iif($godstatus($nick) == 1,0,1) writeini " $+ $scriptdiropers.ini" %helper.or.oper $account($nick) %god.status .notice $nick Security override has been $iif($godstatus($nick) == 1,enabled.,disabled.) } } else { .notice $nick god is a privileged command. } } else { .notice $nick You must first auth with  $+ $me $+ . } } ;add a helper to the bot, syntax: ADDHELPER elseif (%com == addhelper) { if ($authed($nick) == 1) { if ($oper($nick) != $null) { if (!$1) { .notice $nick addhelper requires more parameters. (nick|*account) | halt } if ($mid($1,1,1) == $chr(42)) { var %account.nick = $readini(" $+ $scriptdiraccounts.ini",Accounts,$remove($1,*)) elseif (!$readini(" $+ $scriptdiraccounts.ini",Accounts,$remove($1,*))) { .notice $nick Account  $+ $remove($1,*) $+  has not been registered with  $+ $me $+ . | halt } elseif ($helper(%account.nick)) { .notice $nick %account.nick is already a helper. } elseif ($oper(%account.nick)) { .notice $nick %account.nick is already an oper. } else { writeini " $+ $scriptdiropers.ini" Helpers $account(%account.nick) 1 .notice $nick Added $account(%account.nick) as a helper successfully. } } else { elseif ($helper($1) != $null) { .notice $nick  $+ $1 $+  is already a helper. | halt } elseif ($oper($1) != $null) { .notice $nick  $+ $1 $+  is already an oper. | halt } if ($authed($1) == 1) { writeini " $+ $scriptdiropers.ini" Helpers $account($1) 1 .notice $nick Added $1 ( $+ $account($1) $+ ) as a helper successfully. } else { .notice $nick $1 is not authed with  $+ $me $+ . } } } else { .notice $nick addhelper is a privileged command. } } else { .notice $nick You must first auth with  $+ $me $+ . } } ;deletes a helper from the bot, syntax: DELHELPER elseif (%com == delhelper) { if ($authed($nick) == 1) { if ($oper($nick) != $null) { if ($mid($1,1,1) == $chr(42)) { var %account.nick = $readini(" $+ $scriptdiraccounts.ini",Accounts,$remove($1,*)) if (!$1) { .notice $nick delhelper requires more parameters. (nick|*account) | halt } if (!$readini(" $+ $scriptdiraccounts.ini",Accounts,$remove($1,*))) { .notice $nick Account  $+ $remove($1,*) $+  has not been registered with  $+ $me $+ . | halt } if ($helper(%account.nick) != $null) { remini " $+ $scriptdiropers.ini" Helpers $remove($1,*) .notice $nick Removed $account(%account.nick) from a helper successfully. } else { .notice $nick $account(%account.nick) is not a helper. } } else { elseif ($oper($1) != $null) { .notice $nick $1 is already an oper. | halt } if ($authed($1) == 1) { if ($helper($1) != $null) { remini " $+ $scriptdiropers.ini" Helpers $account($1) .notice $nick Removed $1 ( $+ $account($1) $+ ) from a helper successfully. } else { .notice $nick $1 is not a helper. } } else { .notice $nick $1 must first auth with  $+ $me $+ . } } } else { .notice $nick delhelper is a privileged command. } } else { .notice $nick You must first auth with  $+ $me $+ . } } ;people with access to the channel can set an info line for when they join the channel, syntax: SETINFO [info] elseif (%com == setinfo) { if ($channels(%chan) != $null) { if ($authed($nick) == 1) { if ($access(%chan,$nick) == peon) || ($access(%chan,$nick) == op) || ($access(%chan,$nick) == master) || ($access(%chan,$nick) == coowner) || ($access(%chan,$nick) == owner) { if (!$1) { .notice $nick $iif($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account($nick)) == $null,You don't have an info line set.,$parse.from.ini($readini(" $+ $scriptdirchannels.ini",$chan $+ setinfo,$account($nick)))) } elseif ($1 == $chr(42)) { if ($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account($nick)) != $null) { remini " $+ $scriptdirchannels.ini" %chan $+ setinfo $account($nick) .notice $nick Your info line has been cleared. } else { .notice $nick You don't have an info line set. } } else { writeini " $+ $scriptdirchannels.ini" %chan $+ setinfo $account($nick) $parse.to.ini($1-) .notice $nick Your info line has been set to ' $+ $1- $+ '. } } elseif ($access(%chan,$nick) != $null) { .notice $nick You lack sufficient access in %chan to use this command. } else { .notice $nick You lack access to %chan $+ . } } else { .notice $nick You must first auth with  $+ $me $+ . } } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;tells the user that these commands must be done manually elseif (%com == addoper) || (%com == deloper) { .notice $nick Sorry, that command must be done manually. } ;adds the specified user to the channel, syntax: ADDUSER elseif (%com == adduser) { $adduser($nick,$2,%chan,$1) } ;adds a peon to the channel userlist, syntax: ADDPEON elseif (%com == addpeon) { $adduser($nick,$1,%chan,peon) } ;adds an op to the channel userlist, syntax: ADDOP elseif (%com == addop) { $adduser($nick,$1,%chan,op) } ;adds a master to the channel userlist, syntax: ADDMASTER elseif (%com == addmaster) { $adduser($nick,$1,%chan,master) } ;adds a coowner to the channel userlist, syntax: ADDCOOWNER elseif (%com == addcoowner) || (%com == addco) { $adduser($nick,$1,%chan,coowner) } ;adds an owner to the channel userlist, syntax: ADDOWNER elseif (%com == addowner) { $adduser($nick,$1,%chan,owner) } ;changes a person's access level on the channel userlist, syntax: CLVL elseif (%com == clvl) || (%com == changelvl) || (%com == changelevel) { $clvl($nick,$1,%chan,$2) } ;deletes a peon from the channel userlist, syntax: DELPEON elseif (%com == delpeon) { $deluser($nick,$1,%chan,peon) } ;deletes an op from the channel userlist, syntax: DELOP elseif (%com == delop) { $deluser($nick,$1,%chan,op) } ;deletes a master from the channel userlist, syntax: DELMASTER elseif (%com == delmaster) { $deluser($nick,$1,%chan,master) } ;deletes a coowner from the channel userlist, syntax: DELCOOWNER elseif (%com == delcoowner) || (%com == delco) { $deluser($nick,$1,%chan,coowner) } ;deletes an owner from the channel userlist, syntax: DELOWNER elseif (%com == delowner) { $deluser($nick,$1,%chan,owner) } ;deletes a user from the channel userlist, syntax: DELUSER elseif (%com == deluser) { if ($chr(42) isin $1) { var %account.nick = $readini(" $+ $scriptdiraccounts.ini",Accounts,$remove($1,*)) $deluser($nick,$1,%chan,$access(%chan,%account.nick)) } else { $deluser($nick,$1,%chan,$access(%chan,$1)) } } elseif (%com == suspend) { $suspend($nick,$1,%chan,$2) } elseif (%com == unsuspend) { $unsuspend($nick,$1,%chan) } ;displays all peons for the channel, syntax: PLIST [mask] elseif (%com == plist) || (%com == peons) { if ($channels(%chan) != $null) { .notice $nick %chan peons: ( $+ $readalltheini(" $+ $scriptdirchannels.ini",%chan,peon).totalnumber $+ ) .notice $nick $iif($readalltheini(" $+ $scriptdirchannels.ini",%chan,peon) == $null,None.,$userlist(" $+ $scriptdirchannels.ini",%chan,peon)) } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;displays all ops for the channel, syntax: OLIST elseif (%com == olist) || (%com == ops) { if ($channels(%chan) != $null) { .notice $nick %chan ops: ( $+ $readalltheini(" $+ $scriptdirchannels.ini",%chan,op).totalnumber $+ ) .notice $nick $iif($readalltheini(" $+ $scriptdirchannels.ini",%chan,op) == $null,None.,$userlist(" $+ $scriptdirchannels.ini",%chan,op)) } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;displays all masters for the channel, syntax: MLIST elseif (%com == mlist) || (%com == masters) { if ($channels(%chan) != $null) { .notice $nick %chan masters: ( $+ $readalltheini(" $+ $scriptdirchannels.ini",%chan,master).totalnumber $+ ) .notice $nick $iif($readalltheini(" $+ $scriptdirchannels.ini",%chan,master) == $null,None.,$userlist(" $+ $scriptdirchannels.ini",%chan,master)) } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;displays all coowners for the channel, syntax: CLIST elseif (%com == clist) || (%com == coowners) { if ($channels(%chan) != $null) { .notice $nick %chan coowners: ( $+ $readalltheini(" $+ $scriptdirchannels.ini",%chan,coowner).totalnumber $+ ) .notice $nick $iif($readalltheini(" $+ $scriptdirchannels.ini",%chan,coowner) == $null,None.,$userlist(" $+ $scriptdirchannels.ini",%chan,coowner)) } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;displays all owners for the channel, syntax: WLIST elseif (%com == wlist) || (%com == owners) { if ($channels(%chan) != $null) { .notice $nick %chan owners: ( $+ $readalltheini(" $+ $scriptdirchannels.ini",%chan,owner).totalnumber $+ ) .notice $nick $iif($readalltheini(" $+ $scriptdirchannels.ini",%chan,owner) == $null,None.,$userlist(" $+ $scriptdirchannels.ini",%chan,owner)) } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;displays all users for the channel, syntax: USERS elseif (%com == users) { if ($channels(%chan) != $null) { .timerusers -m 1 50 .notice $nick %chan users: ( $+ $calc($readalltheini(" $+ $scriptdirchannels.ini",%chan,owner).totalnumber + $readalltheini(" $+ $scriptdirchannels.ini",%chan,coowner).totalnumber + $readalltheini(" $+ $scriptdirchannels.ini",%chan,master).totalnumber + $readalltheini(" $+ $scriptdirchannels.ini",%chan,op).totalnumber + $readalltheini(" $+ $scriptdirchannels.ini",%chan,peon).totalnumber) $+ ) .timerowner 1 1 .notice $nick Owners $+ ( $+ $readalltheini(" $+ $scriptdirchannels.ini",%chan,owner).totalnumber $+ ) $+ : $iif($readalltheini(" $+ $scriptdirchannels.ini",%chan,owner) == $null,None.,$userlist(" $+ $scriptdirchannels.ini",%chan,owner)) .timercoowner 1 2 .notice $nick Coowners $+ ( $+ $readalltheini(" $+ $scriptdirchannels.ini",%chan,coowner).totalnumber $+ ) $+ : $iif($readalltheini(" $+ $scriptdirchannels.ini",%chan,coowner) == $null,None.,$userlist(" $+ $scriptdirchannels.ini",%chan,coowner)) .timermaster 1 3 .notice $nick Masters $+ ( $+ $readalltheini(" $+ $scriptdirchannels.ini",%chan,master).totalnumber $+ ) $+ : $iif($readalltheini(" $+ $scriptdirchannels.ini",%chan,master) == $null,None.,$userlist(" $+ $scriptdirchannels.ini",%chan,master)) .timerop 1 4 .notice $nick Ops $+ ( $+ $readalltheini(" $+ $scriptdirchannels.ini",%chan,op).totalnumber $+ ) $+ : $iif($readalltheini(" $+ $scriptdirchannels.ini",%chan,op) == $null,None.,$userlist(" $+ $scriptdirchannels.ini",%chan,op)) .timerpeon 1 5 .notice $nick Peons $+ ( $+ $readalltheini(" $+ $scriptdirchannels.ini",%chan,peon).totalnumber $+ ) $+ : $iif($readalltheini(" $+ $scriptdirchannels.ini",%chan,peon) == $null,None.,$userlist(" $+ $scriptdirchannels.ini",%chan,peon)) } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;displays all opers of the bot, syntax: OPERS elseif (%com == opers) || (%com == ircops) { var %i = 1, %olist = $null while (%i <= $ini(" $+ $scriptdiropers.ini",Opers,0)) { %olist = $instok(%olist,$ini(" $+ $scriptdiropers.ini",Opers,%i),*,255) inc %i } var %names, %num = 1 while (%num <= $numtok($replace(%olist,$chr(255),$chr(32)),32)) { %names = %names $+ $iif(%num != 1,$chr(44),$null) $gettok($replace(%olist,$chr(255),$chr(32)),%num,32) inc %num } .notice $nick Opers of $me $+ : ( $+ $numtok(%names,32) $+ ) if ($ini(" $+ $scriptdiropers.ini",Opers,0) == 0) { .notice $nick None. | halt } $iif(%names,.notice $nick %names) } ;displays all helpers of the bot, syntax: HELPERS elseif (%com == helpers) { var %i = 1, %hlist = $null while (%i <= $ini(" $+ $scriptdiropers.ini",Helpers,0)) { var %hlist = $instok(%hlist,$ini(" $+ $scriptdiropers.ini",Helpers,%i),*,255) inc %i } var %names, %num = 1 while (%num <= $numtok($replace(%hlist,$chr(255),$chr(32)),32)) { %names = %names $+ $iif(%num != 1,$chr(44),$null) $gettok($replace(%hlist,$chr(255),$chr(32)),%num,32) inc %num } .notice $nick Helpers of $me $+ : ( $+ $numtok(%names,32) $+ ) if ($ini(" $+ $scriptdiropers.ini",Helpers,0) == 0) { .notice $nick None. | halt } $iif(%names,.notice $nick %names) } ;displays all staff (helper and oper) of the bot, syntax: STAFF elseif (%com == staff) { .notice $nick  $+ $me $+ 's staff: if ($ini(" $+ $scriptdiropers.ini",Opers,0) == 0) { .notice $nick Opers(0): None. } else { var %i = 1, %olist = $null while (%i <= $ini(" $+ $scriptdiropers.ini",Opers,0)) { var %olist = $instok(%olist,$ini(" $+ $scriptdiropers.ini",Opers,%i),*,255) inc %i } var %names, %num = 1 while (%num <= $numtok($replace(%olist,$chr(255),$chr(32)),32)) { %names = %names $+ $iif(%num != 1,$chr(44),$null) $gettok($replace(%olist,$chr(255),$chr(32)),%num,32) inc %num } .notice $nick Opers $+ ( $+ $numtok(%names,32) $+ ): %names } if ($ini(" $+ $scriptdiropers.ini",Helpers,0) == 0) { .notice $nick Helpers(0) None. } else { var %i = 1, %hlist = $null while (%i <= $ini(" $+ $scriptdiropers.ini",Helpers,0)) { var %hlist = $instok(%hlist,$ini(" $+ $scriptdiropers.ini",Helpers,%i),*,255) inc %i } var %names, %num = 1 while (%num <= $numtok($replace(%hlist,$chr(255),$chr(32)),32)) { %names = %names $+ $iif(%num != 1,$chr(44),$null) $gettok($replace(%hlist,$chr(255),$chr(32)),%num,32) inc %num } .notice $nick Helpers $+ ( $+ $numtok(%names,32) $+ ): %names } } ;invites a user to the channel, syntax: INVITE elseif (%com == invite) { if ($channels(%chan) != $null) { if ($authed($nick) == 1) { if ($access(%chan,$nick) == master) || ($access(%chan,$nick) == coowner) || ($access(%chan,$nick) == owner) || ($godstatus($nick) == 1) { if (!$1) { .notice $nick  $+ %com $+  requires more parameters. (nick) } else { if ($1 !ison %chan) { invite $1 %chan .notice $nick Invited  $+ $1 $+  to %chan $+ . } else { .notice $nick  $+ $1 $+  is already on %chan $+ . } } } elseif ($access(%chan,$nick) != $null) { .notice $nick You lack sufficient access to %chan $+ . } else { .notice $nick You lack access to %chan $+ . } } else { .notice $nick You must first auth with  $+ $me $+ . } } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;invites yourself to the channel, syntax: INVITEME <#channel> elseif (%com == inviteme) { if ($channels(%chan) != $null) { if ($authed($nick) == 1) { if ($access(%chan,$nick) != $null) || ($godstatus($nick) == 1) { if ($nick !ison %chan) { invite $nick %chan } else { .notice $nick You are already on  $+ %chan $+ . } } else { .notice $nick You lack access to %chan $+ . } } else { .notice $nick You must first auth with  $+ $me $+ . } } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;displays various info about the channel, syntax: INFO <#channel> elseif (%com == info) { if ($channels(%chan) != $null) { var %ownercount = $readalltheini(" $+ $scriptdirchannels.ini",%chan,owner).totalnumber var %coownercount = $readalltheini(" $+ $scriptdirchannels.ini",%chan,coowner).totalnumber var %mastercount = $readalltheini(" $+ $scriptdirchannels.ini",%chan,master).totalnumber var %opcount = $readalltheini(" $+ $scriptdirchannels.ini",%chan,op).totalnumber var %peoncount = $readalltheini(" $+ $scriptdirchannels.ini",%chan,peon).totalnumber var %totalusercount = $calc(%ownercount + %coownercount + %mastercount + %opcount + %peoncount) var %totalbancount = $readalltheini(" $+ $scriptdirchannels.ini",%chan $+ blist,*).totalnumber .timernoticeinfo -m 1 50 .notice $nick  $+ %chan $+  info: .timernoticeuser1 1 1 .notice $nick Owners: %ownercount Coowners: %coownercount Masters: %mastercount .timernoticeuser2 1 2 .notice $nick Ops: %opcount Peons: %peoncount Total Users: %totalusercount Total Ban Count: %totalbancount .timernoticebancount 1 3 .notice $nick Registered: $channels(%chan) - $readini(" $+ $scriptdirchannels.ini",%chan,Registrar) } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;displays various pieces of information about a channel user, including channel and bot access level ;and the user's info line. If no nick or account is provided, bot returns your own information. ;syntax: ACCESS [nick] elseif (%com == access) { if ($channels(%chan) != $null) { if ($mid($1,1,1) == $chr(42)) { var %account.nick = $readini(" $+ $scriptdiraccounts.ini",Accounts,$remove($1,*)) if (!$readini(" $+ $scriptdiraccounts.ini",Accounts,$remove($1,*))) { .notice $nick Account  $+ $remove($1,*) $+  has not been registered with  $+ $me $+ . | halt } if ($access(%chan,%account.nick).account == $null) { if ($oper(%account.nick) != $null) { .notice $nick $account(%account.nick) is an IRCOp. if ($godstatus(%account.nick) == 1) { .notice $nick $account(%account.nick) lacks access to %chan but has security override enabled. | halt } else { .notice $nick $account(%account.nick) lacks access to %chan $+ . | halt } } elseif ($helper(%account.nick) != $null) { .notice $nick $account(%account.nick) is a Helper. if ($godstatus(%account.nick) == 1) { .notice $nick $account(%account.nick) lacks access to %chan but has security override enabled. | halt } else { .notice $nick $account(%account.nick) lacks access to %chan $+ . | halt } } else { .notice $nick $account(%account.nick) lacks access to %chan $+ . | halt } } if ($access(%chan,%account.nick).account != $null) { if ($oper(%account.nick) != $null) { .notice $nick $account(%account.nick) is an IRCOp. if ($godstatus(%account.nick) == 1) { .notice $nick $account(%account.nick) is $iif($left($access(%chan,%account.nick).account,1) == o, an  $+ $access(%chan,%account.nick).account $+ , a  $+ $access(%chan,%account.nick).account $+ ) in %chan and has security override enabled. $iif($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account(%account.nick).account) != $null,.notice $nick $chr(91) $+ $account(%account.nick).account $+ $chr(93) $parse.from.ini($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account(%account.nick)))) | halt } else { .notice $nick $account(%account.nick) is $iif($left($access(%chan,%account.nick).account,1) == o, an  $+ $access(%chan,%account.nick).account $+ , a  $+ $access(%chan,%account.nick).account $+ ) in %chan $+ . $iif($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account(%account.nick)) != $null,.notice $nick $chr(91) $+ $account(%account.nick) $+ $chr(93) $parse.from.ini($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account(%account.nick)))) | halt } } elseif ($helper(%account.nick) != $null) { .notice $nick $account(%account.nick) is a Helper. if ($godstatus(%account.nick) == 1) { .notice $nick $account(%account.nick) is $iif($left($access(%chan,%account.nick).account,1) == o, an  $+ $access(%chan,%account.nick).account $+ , a  $+ $access(%chan,%account.nick).account $+ ) in %chan and has security override enabled. $iif($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account(%account.nick)) != $null,.notice $nick $chr(91) $+ $account(%account.nick) $+ $chr(93) $parse.from.ini($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account(%account.nick)))) | halt } else { .notice $nick $account(%account.nick) is $iif($left($access(%chan,%account.nick).account,1) == o, an  $+ $access(%chan,%account.nick).account $+ , a  $+ $access(%chan,%account.nick).account $+ ) in %chan $+ . $iif($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account(%account.nick)) != $null,.notice $nick $chr(91) $+ $account(%account.nick) $+ $chr(93) $parse.from.ini($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account(%account.nick)))) | halt } } else { .notice $nick $account(%account.nick) is $iif($left($access(%chan,%account.nick).account,1) == o, an  $+ $access(%chan,%account.nick).account $+ , a  $+ $access(%chan,%account.nick).account $+ ) in %chan $+ . $iif($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account(%account.nick)) != $null,.notice $nick $chr(91) $+ $account(%account.nick) $+ $chr(93) $parse.from.ini($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account(%account.nick)))) | halt } } } if ($1 == $me) { .notice $nick  $+ $me $+  is the channel service bot. | halt } elseif (!$1) { if ($authed($nick) == 1) { if ($access(%chan,$nick) == $null) { if ($oper($nick) != $null) { .notice $nick $nick is an IRCOp. if ($godstatus($nick) == 1) { .notice $nick $nick ( $+ $account($nick) $+ ) lacks access to %chan but has security override enabled. } else { .notice $nick $nick ( $+ $account($nick) $+ ) lacks access to %chan $+ . } } elseif ($helper($nick)) { .notice $nick $nick is a Helper. if ($godstatus($nick) == 1) { .notice $nick $nick ( $+ $account($nick) $+ ) lacks access to %chan but has security override enabled. } else { .notice $nick $nick ( $+ $account($nick) $+ ) lacks access to %chan $+ . } } else { .notice $nick $nick ( $+ $account($nick) $+ ) lacks access to %chan $+ . } } if ($access(%chan,$nick) != $null) { if ($oper($nick) != $null) { .notice $nick $nick is an IRCOp. if ($godstatus($nick) == 1) { .notice $nick $nick ( $+ $account($nick) $+ ) is $iif($left($access(%chan,$nick),1) == o,an  $+ $access(%chan,$nick) $+ , a  $+ $access(%chan,$nick) $+ ) in %chan and has security override enabled. $iif($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account($nick)) != $null,.notice $nick $chr(91) $+ $nick $+ $chr(93) $parse.from.ini($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account($nick)))) | halt } else { .notice $nick $nick ( $+ $account($nick) $+ ) is $iif($left($access(%chan,$nick),1) == o,an  $+ $access(%chan,$nick) $+ , a  $+ $access(%chan,$nick) $+ ) in %chan $+ . $iif($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account($nick)) != $null,.notice $nick $chr(91) $+ $nick $+ $chr(93) $parse.from.ini($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account($nick)))) | halt } } elseif ($helper($nick)) { .notice $nick $nick is a Helper. if ($godstatus($nick) == 1) { .notice $nick $nick ( $+ $account($nick) $+ ) is $iif($left($access(%chan,$nick),1) == o,an  $+ $access(%chan,$nick) $+ , a  $+ $access(%chan,$nick) $+ ) in %chan and has security override enabled. $iif($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account($nick)) != $null,.notice $nick $chr(91) $+ $nick $+ $chr(93) $parse.from.ini($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account($nick)))) | halt } else { .notice $nick $nick ( $+ $account($nick) $+ ) is $iif($left($access(%chan,$nick),1) == o,an  $+ $access(%chan,$nick) $+ , a  $+ $access(%chan,$nick) $+ ) in %chan $+ . $iif($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account($nick)) != $null,.notice $nick $chr(91) $+ $nick $+ $chr(93) $parse.from.ini($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account($nick)))) | halt } } else { .notice $nick $nick ( $+ $account($nick) $+ ) is $iif($left($access(%chan,$nick),1) == o,an  $+ $access(%chan,$nick) $+ , a  $+ $access(%chan,$nick) $+ ) in %chan $+ . $iif($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account($nick)) != $null,.notice $nick $chr(91) $+ $nick $+ $chr(93) $parse.from.ini($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account($nick)))) | halt } } } else { .notice $nick You must first auth with  $+ $me $+ . } } else { if ($authed($1) == 1) { if ($access(%chan,$1) == $null) { if ($oper($1) != $null) { .notice $nick $1 is an IRCOp. if ($godstatus($1) == 1) { .notice $nick $1 ( $+ $account($1) $+ ) lacks access to %chan but has security override enabled. } else { .notice $nick $1 ( $+ $account($1) $+ ) lacks access to %chan $+ . } } if ($helper($1) != $null) { .notice $nick $1 is a Helper. if ($godstatus($1) == 1) { .notice $nick $1 ( $+ $account($1) $+ ) lacks access to %chan but has security override enabled. } else { .notice $nick $1 ( $+ $account($1) $+ ) lacks access to %chan $+ . } } else { .notice $nick $1 ( $+ $account($1) $+ ) lacks access to %chan $+ . } } if ($access(%chan,$1) != $null) { if ($oper($1) != $null) { .notice $nick $1 is an IRCOp. if ($godstatus($1) == 1) { .notice $nick $1 ( $+ $account($1) $+ ) is $iif($left($access(%chan,$1),1) == o,an  $+ $access(%chan,$1) $+ , a  $+ $access(%chan,$1) $+ ) in %chan and has security override enabled. $iif($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account($1)) != $null,.notice $nick $chr(91) $+ $1 $+ $chr(93) $parse.from.ini($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account($1)))) | halt } else { .notice $nick $1 ( $+ $account($1) $+ ) is $iif($left($access(%chan,$1),1) == o,an  $+ $access(%chan,$1) $+ , a  $+ $access(%chan,$1) $+ ) in %chan $+ . $iif($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account($1)) != $null,.notice $nick $chr(91) $+ $1 $+ $chr(93) $parse.from.ini($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account($1)))) | halt } } elseif ($helper($1) != $null) { .notice $nick $1 is a Helper. if ($godstatus($1) == 1) { .notice $nick $1 ( $+ $account($1) $+ ) is $iif($left($access(%chan,$1),1) == o,an  $+ $access(%chan,$1) $+ , a  $+ $access(%chan,$1) $+ ) in %chan and has security override enabled. $iif($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account($1)) != $null,.notice $nick $chr(91) $+ $1 $+ $chr(93) $parse.from.ini($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account($1)))) | halt } else { .notice $nick $1 ( $+ $account($1) $+ ) is $iif($left($access(%chan,$1),1) == o,an  $+ $access(%chan,$1) $+ , a  $+ $access(%chan,$1) $+ ) in %chan $+ . $iif($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account($1)) != $null,.notice $nick $chr(91) $+ $1 $+ $chr(93) $parse.from.ini($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account($1)))) | halt } } else { .notice $nick $1 ( $+ $account($1) $+ ) is $iif($left($access(%chan,$1),1) == o,an  $+ $access(%chan,$1) $+ , a  $+ $access(%chan,$1) $+ ) in %chan $+ . $iif($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account($1)) != $null,.notice $nick $chr(91) $+ $1 $+ $chr(93) $parse.from.ini($readini(" $+ $scriptdirchannels.ini",%chan $+ setinfo,$account($1)))) | halt } } } else { .notice $nick $1 must first auth with  $+ $me $+ . } } } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;ops/voices you if you have access, syntax: UP elseif (%com == up) { if ($channels(%chan) != $null) { if ($authed($nick) == 1) { if ($access(%chan,$nick) == Owner) || ($access(%chan,$nick) == Coowner) || ($access(%chan,$nick) == Master) || ($access(%chan,$nick) == Op) { if ($nick isop %chan) { .notice $nick You are already opped in  $+ %chan $+ . | halt } else { mode %chan +o $nick } } elseif ($access(%chan,$nick) == Peon) { if ($nick isvoice %chan) { .notice $nick You are already voiced in  $+ %chan $+ . | halt } else { mode %chan +v $nick } } else { .notice $nick You lack access to %chan $+ . } } else { .notice $nick You must first auth with  $+ $me $+ . } } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;deops/devoices you in the channel, syntax DOWN elseif (%com == down) { if ($channels(%chan) != $null) { if ($nick !isop %chan) && ($nick !isvoice %chan) { .notice $nick You are not opped or voiced in  $+ %chan $+ . | halt } else { mode %chan -ov $nick $nick } } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;giveownership of the channel to another user, syntax: GIVEOWNERSHIP [nick|*account] elseif (%com == giveownership) { $giveownership($nick,$1,%chan) } ;sets the setters level for the channel, syntax: SET SETTERS elseif (%com == set) && ($1 == setters) { if ($channels(%chan) != $null) { if ($authed($nick) == 1) { ;checks the current channel's setters var %setters = $setters(%chan) if (%setters != $null) { if ($setters(%chan) == Masters) { var %setters.number = 3 } elseif ($setters(%chan) == Coowners) { var %setters.number = 4 } elseif ($setters(%chan) == Owners) { var %setters.number = 5 } } if ($setters(%chan) == %setters) { if ($access(%chan,$nick).level >= %setters.number) { if ($1 == setters) { if ($2 != $null) { if ($2 isnum) && ($2 == 0) || ($2 == 1) || ($2 == 2) { if ($2 == 0) { writeini " $+ $scriptdirchannels.ini" %chan Setters Masters .notice $nick Setters 0 - Masters and above may change settings. } elseif ($2 == 1) { writeini " $+ $scriptdirchannels.ini" %chan Setters Coowners .notice $nick Setters 1 - Coowners and above may change settings. } elseif ($2 == 2) { writeini " $+ $scriptdirchannels.ini" %chan Setters Owners .notice $nick Setters 2 - Owners may change settings. } } else { .notice $nick ' $+ $2 $+ ' is an invalid setters setting. } } else { if ($setters(%chan) == Masters) { .notice $nick Setters 0 - Masters and above may change settings. } elseif ($setters(%chan) == Coowners) { .notice $nick Setters 1 - Coowners and above may change settings. } elseif ($setters(%chan) == Owners) { .notice $nick Setters 2 - Owners may change settings. } } } else { .notice $nick  $+ $1 $+  is not a valid set option. } } elseif ($access(%chan,$nick) != $null) { .notice $nick You lack sufficient access in %chan to use this command. } else { .notice $nick You lack access to %chan $+ . } } } else { .notice $nick You must first auth with  $+ $me $+ . } } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;adjusts user limit to prevent join floods, syntax: SET DYNLIMIT elseif (%com == set) && ($1 == dynlimit) { if ($channels(%chan) != $null) { if ($authed($nick) == 1) { var %setters = $setters(%chan) if (%setters != $null) { if ($setters(%chan) == Masters) { var %setters.number = 3 } elseif ($setters(%chan) == Coowners) { var %setters.number = 4 } elseif ($setters(%chan) == Owners) { var %setters.number = 5 } } if ($setters(%chan) == %setters) { if ($access(%chan,$nick).level >= %setters.number) { if ($1 == dynlimit) { if ($2 != $null) { if ($2 == 0) || ($2 == Disable) { writeini " $+ $scriptdirchannels.ini" %chan Dynlimit Disabled .timerdynlimit [ $+ [ %chan ] $+ ] off .notice $nick Dynlimit - Disabled. } elseif ($2 == 1) || ($2 == Enable) { writeini " $+ $scriptdirchannels.ini" %chan EnfTopic Enabled .timerdynlimit [ $+ [ %chan ] ] 0 300 chanlimit %chan .notice $nick Dynlimit - Enabled. mode %chan +l $calc($nick(%chan,0) + 7) } else { .notice $nick  $+ $2 $+  is an invalid binary value. } } else { .notice $nick Dynlimit - $dynlimit(%chan) $+ . } } else { .notice $nick  $+ $1 $+  is not a valid set option. } } elseif ($access(%chan,$nick) != $null) { .notice $nick You lack sufficient access in %chan to use this command. } else { .notice $nick You lack access to %chan $+ . } } } else { .notice $nick You must first auth with  $+ $me $+ . } } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;sets the default topic for the channel, syntax: SET DEFAULTTOPIC elseif (%com == set) && ($1 == topic) || ($1 == defaulttopic) { if ($channels(%chan) != $null) { if ($authed($nick) == 1) { var %setters = $setters(%chan) if (%setters != $null) { if ($setters(%chan) == Masters) { var %setters.number = 3 } elseif ($setters(%chan) == Coowners) { var %setters.number = 4 } elseif ($setters(%chan) == Owners) { var %setters.number = 5 } } if ($setters(%chan) == %setters) { if ($access(%chan,$nick).level >= %setters.number) { if ($1 == topic) || ($1 == defaulttopic) { if ($2 != $null) { if ($2 == $chr(42)) { writeini " $+ $scriptdirchannels.ini" %chan DefaultTopic None topic %chan $chr(3) .notice $nick DefaultTopic - None. } else { writeini " $+ $scriptdirchannels.ini" %chan DefaultTopic $parse.to.ini($2-) topic %chan $2- .notice $nick DefaultTopic - $2- } } elseif ($readini(" $+ $scriptdirchannels.ini",%chan,DefaultTopic) == None) { .notice $nick DefaultTopic - None. | halt } else { .notice $nick DefaultTopic - $parse.from.ini($readini(" $+ $scriptdirchannels.ini",%chan,DefaultTopic)) } } else { .notice $nick  $+ $1 $+  is not a valid set option. } } elseif ($access(%chan,$nick) != $null) { .notice $nick You lack sufficient access in %chan to use this command. } else { .notice $nick You lack access to %chan $+ . } } } else { .notice $nick You must first auth with  $+ $me $+ . } } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;sets the access level required to change the topic, syntax: SET ENFTOPIC elseif (%com == set) && ($1 == enftopic) { if ($channels(%chan) != $null) { if ($authed($nick) == 1) { var %setters = $setters(%chan) if (%setters != $null) { if ($setters(%chan) == Masters) { var %setters.number = 3 } elseif ($setters(%chan) == Coowners) { var %setters.number = 4 } elseif ($setters(%chan) == Owners) { var %setters.number = 5 } } if ($setters(%chan) == %setters) { if ($access(%chan,$nick).level >= %setters.number) { if ($1 == enftopic) { if ($2 != $null) { if ($2 == 0) { writeini " $+ $scriptdirchannels.ini" %chan EnfTopic 0 .notice $nick EnfTopic - Anyone may change the topic. } elseif ($2 == 1) { writeini " $+ $scriptdirchannels.ini" %chan EnfTopic 1 .notice $nick EnfTopic - Ops and above may change the topic. } elseif ($2 == 2) { writeini " $+ $scriptdirchannels.ini" %chan EnfTopic 2 .notice $nick EnfTopic - Masters and above may change the topic. } elseif ($2 == 3) { writeini " $+ $scriptdirchannels.ini" %chan EnfTopic 3 .notice $nick EnfTopic - Coowners and above may change the topic. } elseif ($2 == 4) { writeini " $+ $scriptdirchannels.ini" %chan EnfTopic 4 .notice $nick EnfTopic - Only owners may change the topic. } elseif ($2 == 5) { writeini " $+ $scriptdirchannels.ini" %chan EnfTopic 5 .notice $nick EnfTopic - No one may change the topic. } else { .notice $nick ' $+ $2 $+ ' is an invalid topic lock enforcement setting. } } else { .notice $nick EnfTopic - $enftopic(%chan).words $+ . } } else { .notice $nick  $+ $1 $+  is not a valid set option. } } elseif ($access(%chan,$nick) != $null) { .notice $nick You lack sufficient access in %chan to use this command. } else { .notice $nick You lack access to %chan $+ . } } } else { .notice $nick You must first auth with  $+ $me $+ . } } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;changes the current channel's topic, syntax: TOPIC [topic] elseif (%com == topic) { if ($channels(%chan) != $null) { if ($authed($nick) == 1) { if ($calc($access(%chan,$nick).level - 1) >= $enftopic(%chan)) || ($godstatus($nick) == 1) { if ($1 == $null) { if ($readini(" $+ $scriptdirchannels.ini",%chan,DefaultTopic) != None) { topic %chan $parse.from.ini($readini(" $+ $scriptdirchannels.ini",%chan,DefaultTopic)) .notice $nick Topic is now ' $+ $parse.from.ini($readini(" $+ $scriptdirchannels.ini",%chan,DefaultTopic)) $+ '. } else { .notice $nick  $+ %chan $+  does not have a default topic set. } } else { topic %chan $1- .notice $nick Topic is now ' $+ $1- $+ '. } } elseif ($access(%chan,$nick) != $null) { .notice $nick You lack sufficient access in %chan to use this command. } else { .notice $nick You lack access to %chan $+ . } } else { .notice $nick You must first auth with  $+ $me $+ . } } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;sets the channel greeting, syntax: SET GREETING elseif (%com == set) && ($1 == greeting) { if ($channels(%chan) != $null) { if ($authed($nick) == 1) { var %setters = $setters(%chan) if (%setters != $null) { if ($setters(%chan) == Masters) { var %setters.number = 3 } elseif ($setters(%chan) == Coowners) { var %setters.number = 4 } elseif ($setters(%chan) == Owners) { var %setters.number = 5 } } if ($setters(%chan) == %setters) { if ($access(%chan,$nick).level >= %setters.number) { if ($1 == greeting) { if ($2 != $null) { if ($2 == $chr(42)) { writeini " $+ $scriptdirchannels.ini" %chan Greeting None .notice $nick Greeting - None. } else { writeini " $+ $scriptdirchannels.ini" %chan Greeting $parse.to.ini($2-) .notice $nick Greeting - $2- } } elseif ($readini(" $+ $scriptdirchannels.ini",%chan,Greeting) == None) { .notice $nick Greeting - None. | halt } else { .notice $nick Greeting - $parse.from.ini($readini(" $+ $scriptdirchannels.ini",%chan,Greeting)) } } else { .notice $nick  $+ $1 $+  is not a valid set option. } } elseif ($access(%chan,$nick) != $null) { .notice $nick You lack sufficient access in %chan to use this command. } else { .notice $nick You lack access to %chan $+ . } } } else { .notice $nick You must first auth with  $+ $me $+ . } } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;sets the channel greeting, syntax: SET USERGREETING elseif (%com == set) && ($1 == usergreeting) { if ($channels(%chan) != $null) { if ($authed($nick) == 1) { var %setters = $setters(%chan) if (%setters != $null) { if ($setters(%chan) == Masters) { var %setters.number = 3 } elseif ($setters(%chan) == Coowners) { var %setters.number = 4 } elseif ($setters(%chan) == Owners) { var %setters.number = 5 } } if ($setters(%chan) == %setters) { if ($access(%chan,$nick).level >= %setters.number) { if ($1 == usergreeting) { if ($2 != $null) { if ($2 == $chr(42)) { writeini " $+ $scriptdirchannels.ini" %chan UserGreeting None .notice $nick UserGreeting - None. } else { writeini " $+ $scriptdirchannels.ini" %chan UserGreeting $parse.to.ini($2-) .notice $nick UserGreeting - $2- } } elseif ($readini(" $+ $scriptdirchannels.ini",%chan,UserGreeting) == None) { .notice $nick UserGreeting - None. | halt } else { .notice $nick UserGreeting - $parse.from.ini($readini(" $+ $scriptdirchannels.ini",%chan,UserGreeting)) } } else { .notice $nick  $+ $1 $+  is not a valid set option. } } elseif ($access(%chan,$nick) != $null) { .notice $nick You lack sufficient access in %chan to use this command. } else { .notice $nick You lack access to %chan $+ . } } } else { .notice $nick You must first auth with  $+ $me $+ . } } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;sets the channel toys option, syntax: SET TOYS elseif (%com == set) && ($1 == toys) { if ($channels(%chan) != $null) { if ($authed($nick) == 1) { var %setters = $setters(%chan) if (%setters != $null) { if ($setters(%chan) == Masters) { var %setters.number = 3 } elseif ($setters(%chan) == Coowners) { var %setters.number = 4 } elseif ($setters(%chan) == Owners) { var %setters.number = 5 } } if ($setters(%chan) == %setters) { if ($access(%chan,$nick).level >= %setters.number) { if ($1 == toys) { if ($2 != $null) { if ($2 isnum) && ($2 == 0) || ($2 == 1) || ($2 == 2) { if ($2 == 0) { writeini " $+ $scriptdirchannels.ini" %chan Toys 0 .notice $nick Toys - Toys are completely disabled. } elseif ($2 == 1) { writeini " $+ $scriptdirchannels.ini" %chan Toys 1 .notice $nick Toys - Toys will only reply privately. } elseif ($2 == 2) { writeini " $+ $scriptdirchannels.ini" %chan Toys 2 .notice $nick Toys - Toys will reply publicly. } } else { .notice $nick ' $+ $2 $+ ' is an invalid toys setting. } } else { if ($toys(%chan) == 0) { .notice $nick Toys $toys(%chan) - Toys are completely disabled } elseif ($toys(%chan) == 1) { .notice $nick Toys $toys(%chan) - Toys will only reply privately. } elseif ($toys(%chan) == 2) { .notice $nick Toys $toys(%chan) - Toys will reply publicly. } } } else { .notice $nick  $+ $1 $+  is not a valid set option. } } elseif ($access(%chan,$nick) != $null) { .notice $nick You lack sufficient access in %chan to use this command. } else { .notice $nick You lack access to %chan $+ . } } } else { .notice $nick You must first auth with  $+ $me $+ . } } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;sets the channel default modes, syntax: SET MODES elseif (%com == set) && ($1 == modes) { if ($channels(%chan) != $null) { if ($authed($nick) == 1) { var %setters = $setters(%chan) if (%setters != $null) { if ($setters(%chan) == Masters) { var %setters.number = 3 } elseif ($setters(%chan) == Coowners) { var %setters.number = 4 } elseif ($setters(%chan) == Owners) { var %setters.number = 5 } } if ($setters(%chan) == %setters) { if ($access(%chan,$nick).level >= %setters.number) { if ($1 == modes) { if ($2 != $null) { if ($2 == $chr(42)) { $modelock(%chan,$nick,$2-) | return } var %i = 1, %length = $len($remove($2,+,-)) while (%i <= %length) { if ($mid($remove($2,+,-),%i,1) !isin $chanmodes) { .notice $nick  $+ $2 $+  is an invalid mode lock setting. | halt } inc %i } $modelock(%chan,$nick,$2,$3,$5) } else { $restoremodes(%chan,$nick).info } } else { .notice $nick  $+ $1 $+  is not a valid set option. } } elseif ($access(%chan,$nick) != $null) { .notice $nick You lack sufficient access in %chan to use this command. } else { .notice $nick You lack access to %chan $+ . } } } else { .notice $nick You must first auth with  $+ $me $+ . } } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;change the channel modes, syntax: MODE [mode] elseif (%com == mode) { if ($channels(%chan) != $null) { if ($authed($nick) == 1) { if ($access(%chan,$nick) == op) || ($access(%chan,$nick) == master) || ($access(%chan,$nick) == coowner) || ($access(%chan,$nick) == owner) || ($godstatus($nick) == 1) { if ($1 != $null) { var %i = 1, %length = $len($remove($1,+,-)) while (%i <= %length) { if ($mid($remove($1,+,-),%i,1) !isin $chanmodes) { .notice $nick  $+ $1 $+  is an invalid mode lock setting. | halt } inc %i } $modechange(%chan,$nick,$1,$2,$3,$4) } else { $restoremodes(%chan,$nick) } } elseif ($access(%chan,$nick) != $null) { .notice $nick You lack sufficient access in %chan to use this command. } else { .notice $nick You lack access to %chan $+ . } } else { .notice $nick You must first auth with  $+ $me $+ . } } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;sets the channel voice, syntax: SET VOICE elseif (%com == set) && ($1 == voice) { if ($channels(%chan) != $null) { if ($authed($nick) == 1) { var %setters = $setters(%chan) if (%setters != $null) { if ($setters(%chan) == Masters) { var %setters.number = 3 } elseif ($setters(%chan) == Coowners) { var %setters.number = 4 } elseif ($setters(%chan) == Owners) { var %setters.number = 5 } } if ($setters(%chan) == %setters) { if ($access(%chan,$nick).level >= %setters.number) { if ($1 == voice) { if ($2 != $null) { if ($2 isnum) && ($2 == 0) || ($2 == off) || ($2 == 1) || ($2 == on) { if ($2 == 0) || ($2 == off) { writeini " $+ $scriptdirchannels.ini" %chan Voice Disabled .notice $nick Voice - Disabled. } elseif ($2 == 1) || ($1 == on) { writeini " $+ $scriptdirchannels.ini" %chan Voice Enabled .notice $nick Voice - Enabled. } } else { .notice $nick ' $+ $2 $+ ' is an invalid voice setting. } } else { .notice $nick Voice - $readini(" $+ $scriptdirchannels.ini",%chan,Voice) $+ . } } else { .notice $nick  $+ $1 $+  is not a valid set option. } } elseif ($access(%chan,$nick) != $null) { .notice $nick You lack sufficient access in %chan to use this command. } else { .notice $nick You lack access to %chan $+ . } } } else { .notice $nick You must first auth with  $+ $me $+ . } } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;sets the channel protect, syntax: SET PROTECT elseif (%com == set) && ($1 == protect) { if ($channels(%chan) != $null) { if ($authed($nick) == 1) { var %setters = $setters(%chan) if (%setters != $null) { if ($setters(%chan) == Masters) { var %setters.number = 3 } elseif ($setters(%chan) == Coowners) { var %setters.number = 4 } elseif ($setters(%chan) == Owners) { var %setters.number = 5 } } if ($setters(%chan) == %setters) { if ($access(%chan,$nick).level >= %setters.number) { if ($1 == protect) { if ($2 != $null) { if ($2 isnum) && ($2 == 0) || ($2 == 1) || ($2 == 2) { if ($2 == 0) { writeini " $+ $scriptdirchannels.ini" %chan Protect 0 .notice $nick Protect 0 - No users will be protected. } elseif ($2 == 1) { writeini " $+ $scriptdirchannels.ini" %chan Protect 1 .notice $nick Protect 1 - Users will be protected from those of lower access. } elseif ($2 == 2) { writeini " $+ $scriptdirchannels.ini" %chan Protect 2 .notice $nick Protect 2 - Users will be protected from those of equal or lower access. } } else { .notice $nick ' $+ $2 $+ ' is an invalid protect setting. } } else { if ($protection(%chan) == 0) { .notice $nick Protect 0 - No users will be protected. } elseif ($protection(%chan) == 1) { .notice $nick Protect 1 - Users will be protected from those of lower access. } elseif ($protection(%chan) == 2) { .notice $nick Protect 2 - Users will be protected from those of equal or lower access. } } } else { .notice $nick  $+ $1 $+  is not a valid set option. } } elseif ($access(%chan,$nick) != $null) { .notice $nick You lack sufficient access in %chan to use this command. | halt } else { .notice $nick You lack access to %chan $+ . } } } else { .notice $nick You must first auth with  $+ $me $+ . } } else { .notice $nick %chan has not been registered with  $+ $me $+ . } } ;sets the channel spam option, syntax: SET SPAM