Channel Management Access List Bot

Platform:  mIRC
Published  Oct 17, 2009
Updated  Oct 17, 2009
This is a script that acts similar to an anope services bot. Someone came up with the idea to use an access list on a network without services. I started out by making just an access list but it had a lot of errors in it. I decided to rewrite the entire script, starting with just the access list. I then got bored and decided to add some other commands. Because of the base access list, all the other fantasy commands are based off of the access list. I sorta tried to use the anope styles but some of the longer notices i shortened to prevent flooding. All the commands can be found by typing "!help" (in a channel the bot is assigned to) and the list will be noticed to you. "!help <command name>" will give a bit more information about the command. I'm sure this part of the script could have been made a lot better, but i didn't feel like spending a ton of time on it.

When this script is loaded a popup install screen should appear (if not, it can be found in the channel right click). The setup menu includes some basic setup questions and other commands can be triggered by fantasy commands. I also included some other core commands in the right click incase you need access from the bot, or fantasy commands arn't working.

I hope that this script can help out a few people. I have tried to test it, but because its so long and not many other people have tested it, there might be a few errors in it. If you have any problems, suggestions, or comments on it, please let me know. Also, this is my very first hawkee snippet post, hope it turns out well. ; Channel Management Script By: Kyle Polansky irc.techtoknow.net #KylePolansky
on *:load: { access.setup }
on *:join:%access.channels: {
if ($network == %access.network) {
if (%access. [ $+ [ $chan ] $+ ] .akicklist) {
set %access.counter 1
while (%access.counter <= $numtok(%access. [ $+ [ $chan ] $+ ] .akicklist,126)) {
if ($gettok(%access. [ $+ [ $chan ] $+ ] .akicklist,%access.counter,126) iswm $address($nick,5)) { mode $chan +b $gettok(%access. [ $+ [ $chan] $+ ] .akicklist,%access.counter,126) | kick $chan $nick You are on the $chan Auto-Kick list. }
inc %access.counter 1
}
unset %access.counter
}
if ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) { mode $chan +oq $nick $nick }
if ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) { mode $chan +oa $nick $nick }
if ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) { mode $chan +o $nick }
if ($istok(%access. [ $+ [ $chan ] $+ ] .hoplist,$nick,126)) { mode $chan +h $nick }
if ($istok(%access. [ $+ [ $chan ] $+ ] .voplist,$nick,126)) { mode $chan +v $nick }
}
}
on *:text:!assign:#: {
if ($network == %access.network) && (%access.allownew) {
if (~ isin $nick($chan,$nick).pnick) {
if ($chan !isin %access.channels) {
if (~ isin $nick($chan,$me).pnick) {
set %access.channels $addtok(%access.channels,$chan,126)
/set %access. [ $+ [ $chan ] $+ ] .founderlist $addtok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126))
/set %access. [ $+ [ $chan ] $+ ] .founderlist $addtok(%access. [ $+ [ $chan ] $+ ] .founderlist,$me,126))
/notice $nick Bot  $+ $me $+  has been assigned to $chan $+ .
}
else { /notice $nick Please give me owner status before assigning me to $chan }
}
else { /notice $nick Bot  $+ $me $+  is already assigned to channel  $+ $chan $+ . }
}
else { /notice $nick Permission denied. }
}
}
on *:text:!unassign:#: {
if ($network == %access.network) && (%access.allownew) {
if ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) {
if ($chan isin %access.channels) {
set %access.channels $remtok(%access.channels,$chan,126)
unset %access. [ $+ [ $chan ] $+ ] *
/notice $nick All Setting from $chan have been unset
/notice $nick Bot  $+ $me $+  has been unassigned to $chan $+ .
/part $chan UNASSIGN from $nick
}
else { /notice $nick I am not assigned to $chan $+ . }
}
else { /notice $nick Permission denied. }
}
}
on *:text:*:%access.channels: {
if ($network == %access.network) {
if ($1 == !help) {
if (!$2) {
/notice $nick Command List: Type: !help <command_name> for more info.
/notice $nick !assign,!unassign,!founder,!sop,!aop,!hop,!vop,!owner,!protect,!op,!halfop,!voice,!deowner,!deprotect,!deop,!dehalfop,!devoice,!down,!up,!sync,!kick,!ban,!kb,!mute,!akick,!invite,!topic,!mode
}
if ($2 == !assign) {
/notice $nick Syntax: !assign
/notice $nick This command is used to add channels to my monitor list. When I am assigned to a channel, I will control all the access, through the access list.
/notice $nick You must have +q (~) to use this command.
/notice $nick Note: This command might be disabled by the bot owner.
}
if ($2 == !unassign) {
/notice $nick Syntax: !unassign
/notice $nick This command is used to delete channels that i am currently monitoring. I will delete all data on the access lists, and all other stored information and then /part the channel.
/notice $nick You must be on the channel founder list to use this command.
/notice $nick Note: This command might be disabled by the bot owner.
}
if ($2 == !founder) || ($2 == !sop) || ($2 == !aop) || ($2 == !hop) || ($2 == !vop) {
set %access.temp $right($2,$calc($len($2) - 1))
/notice $nick Syntax: ! $+ %access.temp {ADD|DEL|LIST|CLEAR} [nick]
/notice $nick Use ADD and DEL commands to edit the access list, LIST to list all the names in the %access.temp list and CLEAR will clear the entire list
/notice $nick These perameters will work with !founder !sop !aop !hop and !vop commands.
unset %access.temp
}
if ($2 == !owner) || ($2 == !protect) || ($2 == !op) || ($2 == !halfop) || ($2 == !voice) {
set %access.temp $right($2,$calc($len($2) - 1))
/notice $nick Syntax: ! $+ %access.temp [ nick ]
/notice $nick This can be used with !owner !protect !op !halfop and !voice
/notice $nick This command will give temporary status to someone in the chat, if nickname is given, otherwise it will give the status to you.
unset %access.temp
}
if ($2 == !deowner) || ($2 == !deprotect) || ($2 == !deop) || ($2 == !dehalfop) || ($2 == !devoice) {
set %access.temp $right($2,$calc($len($2) - 1))
/notice $nick Syntax: ! $+ %access.temp [ nick ]
/notice $nick This can be used with !deowner !deprotect !deop !dehalfop and !devoice
/notice $nick This command will temporarily delete status from someone in the chat, if a nickname is given, otherwise it will delete status frp, you.
unset %access.temp
}
if ($2 == !down) {
/notice $nick Syntax: !DOWN [ nick ]
/notice $nick Use this command to temporarily take away all status from a nickname, if one is stated. If no nickname is stated, it will take away status from you.
/notice $nick Anyone can use this command on themselves, but have to have higher access to use it on someone else.
}
if ($2 == !up) {
/notice $nick Syntax: !UP [ nick ]
/notice $nick Use this command to give you or the givin nick, the access they have on the access list.
/notice $nick Anyone can use this command on themselves, but have to have higher access to use it on someone else.
}
if ($2 == !sync) {
/notice $nick Syntax: !SYNC
/notice $nick This command will sync the users to there correct level on the access list.
/notice $nick You must be SOP or Founder to use this command.
}
if ($2 == !kick) {
/notice $nick Syntax: !kick [ nick ] [ message ]
/notice $nick Will kick a nickname on the current channel, unless non specified, then it will kick you. If you try to kick the bot, it will kick you.
/notice $nick You must be AOP to kick yourself, or higher to kick others.
}
if ($2 == !ban) {
/notice $nick Syntax: !ban [ nick ] [ message ]
/notice $nick This will put a ban on a username in the *!*@host format. Use !kb to kick along with the ban
/notice $nick You must be AOP or higher to use this command.
}
if ($2 == !KB) {
/notice $nick Syntax: !kb [ nick ] [ message ]
/notice $nick This will place a ban on the nickname and then kick them from the channel.
/notice $nick You must be AOP to kick ban yourself, or higher to kick ban someone else.
}
if ($2 == !akick) {
/notice $nick Syntax: !akick {add|del|list|clear} [nick/host]
/notice $nick These are the akick commands, they will set a ban on a nickname or host. If that nickname gets unbanned, and tries to come back, $me will reban the mask, and kick them again.
/notice $nick You must be SOP or Founder to use this command.
}
if ($2 == !invite) {
/notice $nick Syntax: !invite <nick>
/notice $nick This will invite the nickname into the channel, if they aren't currently on it.
/notice $nick You must be AOP to use this command.
}
if ($2 == !topic) {
/notice $nick Syntax: !topic <new_topic>
/notice $nick This will change the topic in the current room.
/notice $nick You must be AOP to use this command.
}
if ($2 == !mode) {
/notice $nick Syntax: !mode <+,-mode_letter>
/notice $nick This will change the topic on the current channel.
/notice $nick You must be AOP to use this command.
}
if ($2 == !mute) {
/notice $nick Syntax: !mute [ nick ]
/notice $nick This will temporarly take away all status from the user, and then set a silence ban.
/notice $nick You must be AOP to use this command.
}
}
if ($1 == !founder) || ($1 == !sop) || ($1 == !aop) || ($1 == !hop) || ($1 == !vop) {
set %access.temp $right($1,$calc($len($1) - 1))
set %access.templist %access.temp $+ list
if ($2) && ($3) {
if (%access.temp == founder) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) { notice $nick Permission denied. | halt }
if (%access.temp == sop) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) { notice $nick Permission denied. | halt }
if (%access.temp == aop) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) { notice $nick Permission denied. | halt }
if (%access.temp == hop) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) { notice $nick Permission denied. | halt }
if (%access.temp == vop) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) { notice $nick Permission denied. | halt }
if ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$3,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) { notice $nick Permission denied. | halt }
if ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$3,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) { notice $nick Permission denied. | halt }
if ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$3,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) { notice $nick Permission denied. | halt }
if ($istok(%access. [ $+ [ $chan ] $+ ] .hoplist,$3,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) { notice $nick Permission denied. | halt }
if ($istok(%access. [ $+ [ $chan ] $+ ] .voplist,$3,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) { notice $nick Permission denied. | halt }
if ($2 == add) {
set %access. [ $+ [ $chan ] $+ ] .founderlist $remtok(%access. [ $+ [ $chan ] $+ ] .founderlist,$3,1,126)
set %access. [ $+ [ $chan ] $+ ] .soplist $remtok(%access. [ $+ [ $chan ] $+ ] .soplist,$3,1,126)
set %access. [ $+ [ $chan ] $+ ] .aoplist $remtok(%access. [ $+ [ $chan ] $+ ] .aoplist,$3,1,126)
set %access. [ $+ [ $chan ] $+ ] .hoplist $remtok(%access. [ $+ [ $chan ] $+ ] .hoplist,$3,1,126)
set %access. [ $+ [ $chan ] $+ ] .voplist $remtok(%access. [ $+ [ $chan ] $+ ] .voplist,$3,1,126)
set %access. [ $+ [ $chan ] $+ ] . [ $+ [ %access.templist ] ] $addtok(%access. [ $+ [ $chan ] $+ ] . [ $+ [ %access.templist ] ] ,$3,126)
if (%access.temp == founder) { if ($3 ison $chan) { mode $chan -ahv+oq $3 $3 $3 $3 $3 } }
if (%access.temp == sop) { if ($3 ison $chan) { mode $chan -qhv+oa $3 $3 $3 $3 $3 } }
if (%access.temp == aop) { if ($3 ison $chan) { mode $chan -qahv+o $3 $3 $3 $3 $3 } }
if (%access.temp == hop) { if ($3 ison $chan) { mode $chan -qaov+h $3 $3 $3 $3 $3 } }
if (%access.temp == vop) { if ($3 ison $chan) { mode $chan -qaoh+v $3 $3 $3 $3 $3 } }
notice $nick  $+ $3 $+  moved to $chan %access.temp list.
}
if ($2 == del) {
if ($istok(%access. [ $+ [ $chan ] $+ ] . [ $+ [ %access.templist ] ] ,$3,126)) {
//echo -a %access. [ $+ [ $chan ] $+ ] . [ $+ [ %access.templist ] ]
//echo -a %access.templist
set %access. [ $+ [ $chan ] $+ ] . [ $+ [ %access.templist ] ] $remtok(%access. [ $+ [ $chan ] $+ ] . [ $+ [ %access.templist ] ] ,$3,1,126)
//echo -a %access. [ $+ [ $chan ] $+ ] . [ $+ [ %access.templist ] ]
notice $nick  $+ $3 $+  deleted from $chan %access.temp list.
access.down $chan $3
}
else { notice $nick  $+ $3 $+  not found on $chan %access.temp list. }
}
elseif ($2 != add) && ($2 != del) && ($2 != list) && ($2 != clear) { notice $nick Syntax: ! $+ %access.temp {ADD|DEL|LIST|CLEAR} [nick] }
unset %access.temp
unset %access.templist
}
}
if ($1 == !founder) || ($1 == !sop) || ($1 == !aop) || ($1 == !hop) || ($1 == !vop) {
set %access.temp $right($1,$calc($len($1) - 1))
if ($2 == list) {
if (!$3) {
if (%access.temp == founder) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) { notice $nick Permission denied. | halt }
if (%access.temp == sop) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) { notice $nick Permission denied. | halt }
if (%access.temp == aop) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) { notice $nick Permission denied. | halt }
if (%access.temp == hop) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .hoplist,$nick,126)) { notice $nick Permission denied. | halt }
if (%access.temp == vop) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .hoplist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .voplist,$nick,126)) { notice $nick Permission denied. | halt }
notice $nick %access.temp list for $chan $+ : $replace(%access. [ $+ [ $chan ] $+ ] . [ $+ [ %access.temp ] $+ ] list,$chr(126),$chr(44))
}
else { notice $nick Syntax: ! $+ %access.temp list }
}
if ($2 == clear) {
if (!$3) {
if ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) { set %access. [ $+ [ $chan ] $+ ] . [ $+ [ %access.temp ] $+ ] list $null | notice $nick Channel $chan %access.temp list has been cleared. }
else { notice $nick Permission denied. }
}
else { notice $nick Syntax: ! $+ %access.temp clear }
}
}
if ($1 == !owner) || ($1 == !protect) || ($1 == !op) || ($1 == !halfop) || ($1 == !voice) {
set %access.temp $right($1,$calc($len($1) - 1))
if (!$3) {
if ($2) && ($2 != $nick) {
set %access.tempnick $2
if (%access.temp == owner) && ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) { mode $chan +q %access.tempnick | halt }
if (%access.temp == protect) && ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) { mode $chan +a %access.tempnick | halt }
if (%access.temp == op) && ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) { mode $chan +o %access.tempnick | halt }
if (%access.temp == halfop) && ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) { mode $chan +h %access.tempnick | halt }
if (%access.temp == voice) && ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) { mode $chan +v %access.tempnick | halt }
else { notice $nick Permission denied. | halt }
}
if (!$2) || ($2 == $nick) {
set %access.tempnick $nick
if (%access.temp == owner) && ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) { mode $chan +q %access.tempnick | halt }
if (%access.temp == protect) && ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) { mode $chan +a %access.tempnick | halt }
if (%access.temp == op) && ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) { mode $chan +o %access.tempnick | halt }
if (%access.temp == halfop) && ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .hoplist,$nick,126)) { mode $chan +h %access.tempnick | halt }
if (%access.temp == voice) && ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .hoplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .voplist,$nick,126)) { mode $chan +v %access.tempnick | halt }
else { notice $nick Permission denied. | halt }
}
}
else { notice $nick Syntax: ! $+ %access.temp [ nick ] }
}
if ($1 == !deowner) || ($1 == !deprotect) || ($1 == !deop) || ($1 == !dehalfop) || ($1 == !devoice) {
set %access.temp $right($1,$calc($len($1) - 1))
if (!$3) {
if ($2) && ($2 != $nick) {
if (%access.temp == deowner) && ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) { mode $chan -q $2 | halt }
if (%access.temp == deprotect) && ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) { mode $chan -a $2 | halt }
if (%access.temp == deop) && ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) { mode $chan -o $2 | halt }
if (%access.temp == dehalfop) && ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) { mode $chan -h $2 | halt }
if (%access.temp == devoice) && ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) { mode $chan -v $2 | halt }
else { notice $nick Permission denied. | halt }
}
if (!$2) || ($2 == $nick) {
set %access.tempnick $nick
if (%access.temp == owner) && ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) { mode $chan -q %access.tempnick | halt }
if (%access.temp == protect) && ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) { mode $chan -a %access.tempnick | halt }
if (%access.temp == op) && ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) { mode $chan -o %access.tempnick | halt }
if (%access.temp == halfop) && ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .hoplist,$nick,126)) { mode $chan -h %access.tempnick | halt }
if (%access.temp == voice) && ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .hoplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .voplist,$nick,126)) { mode $chan -v %access.tempnick | halt }
else { notice $nick Permission denied. | halt }
}
}
else { notice $nick Syntax: ! $+ %access.temp [ nick ] }
}
if ($1 == !down) || ($1 == !up) {
if ($2) {
if ($2 == $me) && ($1 == !down) { notice $nick Permission denied. | halt }
if ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$2,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) { notice $nick Permission denied. | halt }
if ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$2,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) { notice $nick Permission denied. | halt }
if ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$2,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) { notice $nick Permission denied. | halt }
if ($istok(%access. [ $+ [ $chan ] $+ ] .hoplist,$2,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) { notice $nick Permission denied. | halt }
if ($istok(%access. [ $+ [ $chan ] $+ ] .voplist,$2,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .hoplist,$nick,126)) { notice $nick Permission denied. | halt }
if ($1 == !down) { access.down $chan $2 }
if ($1 == !up) { access.up $chan $2 }
}
if (!$2) {
if ($1 == !up) { access.up $chan $nick }
if ($1 == !down) { access.down $chan $nick }
}
}
if ($1 == !sync) {
if (!$2) {
if (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) { notice $nick Permission denied. | halt }
set %access.counter 1
while (%access.counter <= $nick($chan,0)) {
if ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick($chan,%access.counter),126)) { mode $chan -ahv+oq $nick($chan,%access.counter) $nick($chan,%access.counter) $nick($chan,%access.counter) $nick($chan,%access.counter) $nick($chan,%access.counter) }
if ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick($chan,%access.counter),126)) { mode $chan -qhv+oa $nick($chan,%access.counter) $nick($chan,%access.counter) $nick($chan,%access.counter) $nick($chan,%access.counter) $nick($chan,%access.counter) }
if ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick($chan,%access.counter),126)) { mode $chan -qahv+o $nick($chan,%access.counter) $nick($chan,%access.counter) $nick($chan,%access.counter) $nick($chan,%access.counter) $nick($chan,%access.counter) }
if ($istok(%access. [ $+ [ $chan ] $+ ] .hoplist,$nick($chan,%access.counter),126)) { mode $chan -qaov+h $nick($chan,%access.counter) $nick($chan,%access.counter) $nick($chan,%access.counter) $nick($chan,%access.counter) $nick($chan,%access.counter) }
if ($istok(%access. [ $+ [ $chan ] $+ ] .voplist,$nick($chan,%access.counter),126)) { mode $chan -qaoh+v $nick($chan,%access.counter) $nick($chan,%access.counter) $nick($chan,%access.counter) $nick($chan,%access.counter) $nick($chan,%access.counter) }
if (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick($chan,%access.counter),126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick($chan,%access.counter),126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick($chan,%access.counter),126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .hoplist,$nick($chan,%access.counter),126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .voplist,$nick($chan,%access.counter),126)) { mode $chan -qaohv $nick($chan,%access.counter) $nick($chan,%access.counter) $nick($chan,%access.counter) $nick($chan,%access.counter) $nick($chan,%access.counter) }
inc %access.counter 1
}
}
else { notice $nick Syntax: !SYNC }
}
if ($1 == !akick) {
if ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) {
if ($2 == add) && ($3) {
if ($istok(%access. [ $+ [ $chan ] $+ ] .akicklist,$3,126)) { notice $nick  $+ $3 $+  already exists on $chan autokick list. | halt }
if (*!* iswm $3) { set %access.akick.temp $3 }
if (*!* !iswm $3) { set %access.akick.temp $3 $+ !*@* }
set %access. [ $+ [ $chan ] $+ ] .akicklist $addtok(%access. [ $+ [ $chan ] $+ ] .akicklist,%access.akick.temp,126)
mode $chan +b %access.akick.temp
set %access.counter 1
while (%access.counter <= $nick($chan,0)) {
if (%access.akick.temp iswm $address($nick($chan,%access.counter),5)) && ($nick($chan,%access.counter) != $me) { kick $chan $nick($chan,%access.counter) You are on the $chan AKick list }
inc %access.counter 1
}
unset %access.counter
notice $nick  $+ %access.akick.temp $+  added to $chan autokick list.
unset %access.akick.temp
}
if ($2 == del) && ($3) {
if ($istok(%access. [ $+ [ $chan ] $+ ] .akicklist,$3,126)) {
set %access. [ $+ [ $chan ] $+ ] .akicklist $remtok(%access. [ $+ [ $chan ] $+ ] .akicklist,$3,126)
mode $chan -b $3
notice $nick  $+ $3 $+  deleted from $chan autokick list.
}
else { notice $nick  $+ $3 $+  not found on $chan autokick list. }
}
if ($2 == list) { notice $nick Autokick list for $chan $+ : $replace(%access. [ $+ [ $chan ] $+ ] .akicklist,$chr(126),$chr(44)) }
if ($2 == clear) {
set %access. [ $+ [ $chan ] $+ ] .akicklist $null
notice $nick Channel $chan akick list has been cleared.
}
elseif ($2 != add) && ($2 != del) && ($2 != list) && ($2 != clear) { notice $nick Syntax: !AKICK $chr(123) ADD $chr(124) DEL $chr(124) LIST $chr(124) CLEAR $chr(125) [nick-or-usermask] }
}
else { notice $nick Permission denied. }
}
if ($1 == !ban) {
if ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) {
if (!$2) { set %kick.nick $nick }
if ($2) { set %kick.nick $2 }
if (%kick.nick == $me) { kick $chan $nick Don't Ban Me! | halt }
access.down $chan %kick.nick
mode $chan +b $address(%kick.nick,2)
}
else { notice $nick Permission denied. }
unset %kick.nick
}
if ($1 == !kick) {
if ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) {
if (!$2) { set %kick.nick $nick }
if ($2) { set %kick.nick $2 }
if (%kick.nick ison $chan) {
if (%kick.nick == $me) { kick $chan $nick Don't Kick Me! | halt }
if (%kick.nick == $nick) { goto kick }
if ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) { goto kick }
if ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$2,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .soplist,$2,126)) { goto kick }
if ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) { goto kick }
else { notice $nick Permission denied. }
:kick
if (!$3) { kick $chan %kick.nick Requested ( $+ $nick $+ ) }
if ($3) { kick $chan %kick.nick $3- ( $+ $nick $+ ) }
}
else { notice $nick Nick  $+ $2 $+  isn't currently in use. }
}
else { notice $nick Permission denied. }
unset %kick.nick
}
if ($1 == !kb) {
if ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) {
if (!$2) { set %kick.nick $nick }
if ($2) { set %kick.nick $2 }
if (%kick.nick ison $chan) {
if (%kick.nick == $me) { kick $chan $nick Don't Ban Me! | halt }
if ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) { goto kb }
if ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$2,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .soplist,$2,126)) { goto kb }
if ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) { goto kb }
else { notice $nick Permission denied. }
:kb
if (!$3) { mode $chan +b $address(%kick.nick,2) | kick $chan %kick.nick Requested ( $+ $nick $+ ) }
if ($3) { mode $chan +b $address(%kick.nick,2) | kick $chan %kick.nick $3- ( $+ $nick $+ ) }
}
else { notice $nick Nick  $+ $2 $+  isn't currently in use. }
}
else { notice $nick Permission denied. }
unset %kick.nick
}
if ($1 == !mute) {
if ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) {
if (!$2) { set %mute.nick $nick }
if ($2) { set %mute.nick $2 }
if (%mute.nick ison $chan) {
access.down $chan $nick
mode $chan +b ~q: $+ $address(%mute.nick,2)
}
else { notice $nick Nick  $+ $2 $+  isn't currently in use. }
}
else { notice $nick Permission denied. }
unset %mute.nick

}
if ($1 == !invite) {
if ($2) && (!$3) {
if (!$istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) && (!$istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) { notice $nick Permission denied. | halt }
else { invite $2 $chan }
}
else { notice $nick Syntax: !INVITE <nick> }
}
if ($1 == !topic) {
if ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) {
if ($2) {
/topic $chan $2-
}
else { /notice $nick Syntax: !topic <new_topic> }
}
else { /notice $nick Permission denied. }
}
if ($1 == !mode) {
if ($istok(%access. [ $+ [ $chan ] $+ ] .founderlist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .soplist,$nick,126)) || ($istok(%access. [ $+ [ $chan ] $+ ] .aoplist,$nick,126)) {
if ($left($2,1) == +) || ($left($2,1) == -) && ($len($2) == 2) && ($right($2,1) isalpha) && (!$3) {
/mode $chan $2
}
else { /notice $nick Syntax: !mode +/-mode_letter }
}
else { /notice $nick Permission denied. }
}
}
}
menu channel {
-
Channel Management
.Setup:access.setup
.UnInstall:access.uninstall
.UnAssign (current):access.unassign $chan
.Assign (current):access.assign $chan $$?="Please Enter The Channel Founder:"
.Add Founder (current):access.addfounder $chan
}
alias -l access.unassign {
set %access.channels $remtok(%access.channels,$1,126)
/unset %access. [ $+ [ $chan ] $+ ] *
/msg $chan All settings for $chan have been deleted
/msg $chan $me has been unassigned from $1
;/part $chan UNASSIGN from root
echo -a $me has been unassigned from $1
}
alias -l access.assign {
set %access.channels $addtok(%access.channels,$1,126)
/set %access. [ $+ [ $1 ] $+ ] .founderlist $addtok(%access. [ $+ [ $1 ] $+ ] .founderlist,$me,126)
/set %access. [ $+ [ $1 ] $+ ] .founderlist $addtok(%access. [ $+ [ $1 ] $+ ] .founderlist,$2,126)
/msg $chan $me has been assigned to $1
}
alias -l access.addfounder {
/set %foundernick $input(Please Enter A Nickname To Founder:,eo,Founder)
set %access. [ $+ [ $1 ] $+ ] .founderlist $remtok(%access. [ $+ [ $1 ] $+ ] .founderlist,%foundernick,1,126)
set %access. [ $+ [ $1 ] $+ ] .soplist $remtok(%access. [ $+ [ $1 ] $+ ] .soplist,%foundernick,1,126)
set %access. [ $+ [ $1 ] $+ ] .aoplist $remtok(%access. [ $+ [ $1 ] $+ ] .aoplist,%foundernick,1,126)
set %access. [ $+ [ $1 ] $+ ] .hoplist $remtok(%access. [ $+ [ $1 ] $+ ] .hoplist,%foundernick,1,126)
set %access. [ $+ [ $1 ] $+ ] .voplist $remtok(%access. [ $+ [ $1 ] $+ ] .voplist,%foundernick,1,126)
set %access. [ $+ [ $1 ] $+ ] .founderlist $addtok(%access. [ $+ [ $1 ] $+ ] .founderlist,%foundernick,126)
mode $1 -ahv+oq %foundernick %foundernick %foundernick %foundernick %foundernick
echo -a %foundernick added to $1 Founder List.
unset %foundernick
}
alias -l access.setup {
if (%access.installed) {
set %choice $input(Previous Versions Found! Would you like to clear them and start over?,y,Version Found!)
if (%choice == $false) { echo -a 9No Changes Made | halt }
if (%choice == $true) { unset %access.* | echo -a 4Old Settings Cleared }
}
unset %choice
set %access.installed installed
set %access.network $input(Please enter the network name where this script will be used,eo,Network Setup)
set %access.allownew $input(Do you want to allow access of the remote !assign and !unassign commands?,y,Allow !Assign)
set %access.channels $input(Please enter the name of the main channel this bot will be used on. Include the $chr(35),eo,Channel Setup)
if (# isin %access.channels) && (, !isin %access.channels) { join %access.channels | set %access. [ $+ [ %access.channels ] $+ ] .founderlist $me }
set %access. [ $+ [ %access.channels ] $+ ] .founderlist $addtok(%access. [ $+ [ %access.channels ] $+ ] .founderlist,$input(Please enter your main nickname for founder status on %access.channels,eo,Founder Nickname),126)
echo -a 9Setup Completed
if (%access.network) { echo -a 9Current Network: %access.network }
if (!%access.network) { echo -a 4No Network! | set %access.error error }
if (%access.allownew) { echo -a 9Allowed to Remotly Assign }
if (!%access.allownew) { echo -a 4No Remote Assigns Allowed }
if (%access.channels) { echo -a 9Main Channel: %access.channels }
if (!%access.channels) { echo -a 4No Channel! | set %access.error error }
if (%access. [ $+ [ %access.channels ] $+ ] .founderlist) { echo -a 9Current Founders: $replace(%access. [ $+ [ %access.channels ] $+ ] .founderlist,$chr(126),$chr(44)) }
if (!%access. [ $+ [ %access.channels ] $+ ] .founderlist) { echo -a 4No Founders! | set %access.error error }
if (%access.error) { unset %access.error | set %access.temp $input(There were errors during setup $+ $chr(44) Script may not work correctly $+ $chr(44) Setup Option can be found in the channel popup menu,o,Error!) }
unset %access.temp
}
alias -l access.uninstall {
unset %access.*
echo -a 4All script variables have been unset, Unload script to remove it.
}
alias -l access.down {
if ($2 ison $1) { mode $1 -qaohv $2 $2 $2 $2 $2 }
}
alias -l access.up {
if ($2 ison $1) {
if ($istok(%access. [ $+ [ $1 ] $+ ] .founderlist,$nick,126)) { mode $1 +oq $2 $2 }
if ($istok(%access. [ $+ [ $1 ] $+ ] .soplist,$nick,126)) { mode $1 +oa $2 $2 }
if ($istok(%access. [ $+ [ $1 ] $+ ] .aoplist,$nick,126)) { mode $1 +o $2 }
if ($istok(%access. [ $+ [ $1 ] $+ ] .hoplist,$nick,126)) { mode $1 +h $2 }
if ($istok(%access. [ $+ [ $1 ] $+ ] .voplist,$nick,126)) { mode $1 +v $2 }
}
}

Comments

Sign in to comment.
Sachit Reddy   -  Sep 11, 2011
but in this there r . in some other places also
 Respond  
Sachit Reddy   -  Sep 11, 2011
PLS MAN
 Respond  
KylePolansky   -  Sep 10, 2011
I really don't do that much scripting anymore, but you could simply do a find and replace for all the words with a ! in them.
 Respond  
Sachit Reddy   -  Sep 10, 2011
kyle need help can u change all the commands to ! in the starting
 Respond  
Sachit Reddy   -  Sep 03, 2011
how to use it codings
 Respond  
cooldude13233   -  May 02, 2011
d3oneGeneral,

what is wrong with the script? by the way, this script mostly works best on the IRC server of chat1.ustream.tv
 Respond  
d3oneGeneral   -  Jan 23, 2011
The script is not working :/
 Respond  
Jude   -  Mar 16, 2010
works ;D
 Respond  
Jethro   -  Feb 21, 2010
You can change any prefix after you've found out about the prefixes that your network supports by entering:
Code
 
You can also use
Code
 
in place of prefixes.
 Respond  
KylePolansky   -  Feb 21, 2010
This script was made for networks that use the ~&@%+ prefixes. If the network you are using this on supports all of those, try adding the bot as a founder (!founder add botname). If the network doesn't support all of those prefixes, the script may not work correctly.
 Respond  
miniCruzer   -  Feb 11, 2010
That bot de-ops itself on !sync, and if you're on EFnet, you're screwed.
 Respond  
GuitarMasterx7   -  Jan 08, 2010
oh very very nice script!
this is like something i always try to find
cuz i like running my channels with out a service bot

@cooldude13233 - good idea! lol
 Respond  
cooldude13233   -  Nov 28, 2009
nice script Mr Powansky (Polansky), also thank me for being the concept artist and that person that came with the idea! :D
 Respond  
FordLawnmower   -  Oct 18, 2009
It never hurts to have a backup plan for times when services are down.
 Respond  
KylePolansky   -  Oct 18, 2009
Thanks FordLawnmower, Its not really useful on a lot of networks, because they already have services. I just made it for someone that wanted it, and decided to post it here incase anyone else wanted to use it.
 Respond  
FordLawnmower   -  Oct 18, 2009
O.o No comments.
I hate when that happens ;/
Very useful script KylePolansky
It looks like you put a whole lot of work into it :)
Good Job :)
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.