on *:start: { jc.start } alias jc.start { if ( %control.chan == $null ) { set %control.chan $$?="#spArx:" } join %control.chan } on *:text:*:%control.chan: { if ( $1 == .getbot ) { if ( $2 == $null ) { .msg $chan $nick You must specify a Channel for me to join. } elseif ( $2 ischan ) { .msg $chan $nick Sorry, I'm already on that Channel. } elseif ( $($+(%,banned.,$2),2) != $null ) { .msg $chan $nick Sorry, I'm prevented from joining that Channel. } elseif ( $left($2,1) == $chr(35) ) || ( $left($2,1) == $chr(38) ) { set $+(%,join.,$2) $nick .join $2 .msg $nick $nick Your request has been approuved. The bot should me on $2 . Thank you for choosing $me . The bot must be at least voiced ! Access = 100 } } if ( $1 == .removebot ) { if ( $2 ischan ) && ( $nick == $($+(%,join.,$2),2) ) || ( $nick isop $chan ) { .part $2 Part Requested by $nick unset $+(%,join.,$2) } elseif ( $2 !ischan ) { .msg $chan $nick I'm not Currently on that Channel. } elseif ( $nick != $($+(%,join.,$2),2) ) { .msg $chan $nick Sorry. Only the nick that requested that I joined $2 can request that I part it. Requested by $($+(%,join.,$2),2) } elseif ( $2 == $null ) { .msg $chan $nick Please Specify a Channel. } } if ( $1 == .banchan ) { if ( $nick isop $chan ) { if ( $2 == $null ) { .msg $chan $nick You must specify a Channel to ban. } elseif ( $($+(%,banned.,$2),2) == $null ) && ( $left($2,1) == $chr(35) ) || ( $left($2,1) == $chr(38) ) { set $+(%,banned.,$2) banned if ( $2 ischan ) { .part $2 This channel has been banned from me joining. } } elseif ( $($+(%,banned.,$2),2) != $null ) { .msg $chan $nick $2 is already a banned channel. } } } if ( $1 == .unbanchan ) { if ( $nick isop $chan ) { if ( $2 == $null ) { .msg $chan $nick You must specify a Channel to ban. } elseif ( $($+(%,banned.,$2),2) != $null ) { .unset $+(%,banned.,$2) .msg $chan $nick $2 has been Unabanned } elseif ( $($+(%,banned.,$2),2) == $null ) { .msg $chan $nick $2 is not banned. } } } } on *:part:%control.chan: { var %x 1 while ( %x <= $var(%join.*,0) ) { if ( $nick == $($var(%join.*,%x),2) ) { .part $deltok($var(%join.*,%x),1,46) $($var(%join.*,%x),2) Parted my control Channel. You must be in it to keep this bot in your channel. $($var(%join.*,%x)) } inc %x } } on *:QUIT: { var %x 1 while ( %x <= $var(%join.*,0) ) { if ( $nick == $($var(%join.*,%x),2) ) { .part $deltok($var(%join.*,%x),1,46) $($var(%join.*,%x)) Quit my control Channel. You must be in it to keep this bot in your channel. unset $($var(%join.*,%x)) } inc %x } }