Access System (For Bot) v1

By Anthrophobic on Oct 30, 2010

This is Anthrophobic's Bot Access script. Script was made to have a bot that would replace a botserv bot. This is as far as I made it and moved on, figure there is a lot more to do with it and a better way to set it up. Open to suggestions. Feel free to edit and/or change this code in anyway.

NOTE: Recommended For A Bot!
Simply load this script into your bots remotes and start using.

Commands:
!voice
!devoice
!halfop
!dehalfop
!op
!deop
!protect
!deprotect
!kick
!ban nick
!kickban nick
!cline
!addhalf
!addop
!addprotect
!addtrusted
!addowner

;Scriptor: Anthrophobic
;Access System (For Bot) v1
;irc.gamersvault.net

menu nicklist { 
  User Access:
  .Voice $1:/guser 10 $1
  .Half-Op $1:/guser 50 $1
  .Operator $1:/guser 100 $1
  .Protector $1:/guser 150 $1
  .Trusted $1:/guser 200 $1
  .Owner $1:/guser 400 $1
}

on 50:TEXT:!voice:#: { mode %chan +v $nick }
on 50:TEXT:!devoice:#: { mode %chan -v $nick }
on 50:TEXT:!kick &:#: { if ($nick > $2) { kick # $2 Requested by: $nick } }
on 50:TEXT:!commands:#: { notice $nick !voice, !devoice, !kick }

on 100:TEXT:!voice &:#: { mode # +v $2 }
on 100:TEXT:!devoice &:#: { mode # -v $2 }
on 100:TEXT:!halfop &:#: { mode # +h $2 }
on 100:TEXT:!dehalfop &:#: { mode # -h $2 }
on 100:TEXT:!op &:#: { mode # +o $2 }
on 150:TEXT:!deop &:#: { mode # - o $2 }
on 100:TEXT:!kick &:#: { if ($nick > $2) { kick # $2 Requested by: $nick } }
on 100:TEXT:!ban &:#: { if ($nick > $2) { ban -k # $2 Request by: $nick [Banned] } }
on 100:TEXT:!kickban &:#: { if ($nick > $2) { ban -k $chan $2 Requested by: $nick [Banned] } }
on 100:TEXT:!commands:#: { notice $nick !voice, !devoice, !halfop, !op, !deop, !dehalfop, !kick, !ban, !kickban }

on 150:TEXT:!voice &:#: { mode # +v $2 }
on 150:TEXT:!devoice &:#: { mode # -v $2 }
on 150:TEXT:!halfop &:#: { mode # +h $2 }
on 150:TEXT:!dehalfop &:#: { mode # -h $2 }
on 150:TEXT:!op &:#: { mode # +o $2 }
on 150:TEXT:!deop &:#: { mode # - o $2 }
on 150:TEXT:!protect:#: { mode # +a $2 } 
on 150:TEXT:!deprotect:#: { mode # -a $2 }
on 150:TEXT:!kick &:#: { if ($nick > $2) { kick # $2 Requested by: $nick } }
on 150:TEXT:!ban &:#: { if ($nick > $2) { ban -k # $2 Request by: $nick [Banned] } }
on 150:TEXT:!kickban &:#: { if ($nick > $2) { ban -k $chan $2 Requested by: $nick [Banned] } }
on 150:TEXT:!commands:#: { notice $nick !voice, !devoice, !halfop, !dehalfop, !op, !deop, !protect, !deprotect, !kick, !ban, !kickban }

on 200:TEXT:!voice &:#: { mode # +v $2 }
on 200:TEXT:!devoice &:#: { mode # -v $2 }
on 200:TEXT:!halfop &:#: { mode # +h $2 }
on 200:TEXT:!dehalfop &:#: { mode # -h $2 }
on 200:TEXT:!op &:#: { mode # +o $2 }
on 200:TEXT:!deop &:#: { mode # -o $2 }
on 200:TEXT:!protect:#: { mode # +a $2 } 
on 200:TEXT:!deprotect:#: { mode # -a $2 }
on 200:TEXT:!kick &:#: { if ($nick > $2) { kick # $2 Requested by: $nick } }
on 200:TEXT:!ban &:#: { if ($nick > $2) { ban -k # $2 Request by: $nick [Banned] } }
on 200:TEXT:!kickban &:#: { if ($nick > $2) { ban -k $chan $2 Requested by: $nick [Banned] } }
on 200:TEXT:!addvoice: { mode $chan +v $nick 
/msg $chan $nick now has access level with this bot: 4voice. }
on 200:TEXT:!addhalf &:#: { /guser 50 $2 
/msg $chan $2 now has access level with this bot: 4halfop. }
on 200:TEXT:!addop &:#: { /guser 100 $2 
/msg $chan $2 now has access level with this bot: 4operator. }
on 200:TEXT:!commands:#: { notice $nick !voice, !devoice, !halfop, !dehalfop, !op, !deop, !protect, !deprotect, !kick, !ban, !kickban, !addvoice, !addhalf, !addop }

on 10:JOIN:#channelhere: { mode $chan +v $nick 
/msg $chan $nick has an access level with this bot: 04voice. }
on 50:JOIN:#channelhere: { mode $chan +h $nick 
/msg $chan $nick has an access level with this bot: 4halfop. }
on 100:JOIN:#channelhere: { mode $chan +o $nick 
/msg $chan $nick has an access level with this bot: 4operator. }
on 150:JOIN:#channelhere: { mode $chan +a $nick 
/msg $chan $nick has an access level with this bot: 4protector. }
on 200:JOIN:#channelhere: { mode $chan +a $nick 
/msg $chan $nick has an access level with this bot: 4protector+trusted. }
on 500:JOIN:#channelhere: { mode $chan +q $nick 
/msg $chan $nick has an access level with this bot: 4owner. }

on 500:TEXT:!commands:#: { notice $nick !voice, !devoice, !halfop, !dehalfop, !op, !deop, !protect, !deprotect, !kick, !ban nick, !kickban nick, !cline, !addhalf, !addop, !addprotect, !addtrusted, !addowner
}  
on 500:TEXT:!addvoice &:#: { /guser 10 $2 
/msg $chan $2 now has access level with this bot: 4voice. }
on 500:TEXT:!addhalf &:#: { /guser 50 $2 
/msg $chan $2 now has access level with this bot: 4halfop. }
on 500:TEXT:!addop &:#: { /guser 100 $2 
/msg $chan $2 now has access level with this bot: 4operator. }
on 500:TEXT:!addprotect &:#: { /guser 150 $2 
/msg $chan $2 now has access level with this bot: 4protector. }
on 500:TEXT:!addtrusted &:#: { /guser 200 $2 
/msg $chan $2 now has access level with this bot: 4protector+trusted. }
on 500:TEXT:!addowner &:#: { /guser 500 $2 
/msg $chan $2 now has access level with this bot: 4owner. }

Comments

Sign in to comment.
Anthrophobic   -  Nov 01, 2010

Very nice, well I still have trouble understanding some of this stuff, but for some reason when the code is spread out like mine is I can understand it all.

 Respond  
GuitarMasterx7   -  Nov 01, 2010

wow what WorldDMT said blew my mind D:
i must learn et!

 Respond  
Jethro   -  Oct 31, 2010

Yup, you don't need the ! prefix.

 Respond  
napa182   -  Oct 31, 2010

also you can take out the ! from the event ie:

 on @!*:JOIN:#channelhere:{

an just use @* cuz if the bot or what ever is running it joins it wont trigger cuz they are not +o at the time they join.

 Respond  
WorldDMT   -  Oct 31, 2010

yeah it's only an eg he can add "$&" :D

 Respond  
Jethro   -  Oct 31, 2010

Well thought out, WorldDMT. :-) The only thing that matters is your example will get very long with more info added, so the line break identifier may be needed.

 Respond  
WorldDMT   -  Oct 31, 2010

about on join event u can use $replace and $level

on @!*:JOIN:#channelhere:{
  mode # + $+ $replace($level($nick),500,q,200,a,150,a,100,o,50,h,10,v) $nick
  .msg # $nick has an access level with this bot:04 $replace($level($nick),500,owner,200,protector+trusted,150,protector,100,operator,50,halfop,10,voice) $+ .
}

u can do the same for on text event

 Respond  
Anthrophobic   -  Oct 31, 2010

Thanks for the comments, I will try to change the code around a little and see what happen.s

 Respond  
napa182   -  Oct 30, 2010

going along with what Teen said about making sure ur bot is +o in the channel you can also do

on @*:join:#channel:{

so no need for the $me isop # line
just showing a different way to do the check

 Respond  
_Teen_   -  Oct 30, 2010

let me guess... its ur first snippet...

look, many events, when just need one...

you already tried to use $level?

look

on 100:JOIN:#channelhere: { mode $chan +o $nick 
/msg $chan $nick has an access level with this bot: 4operator. }
on 150:JOIN:#channelhere: { mode $chan +a $nick 
/msg $chan $nick has an access level with this bot: 4protector. }
on 200:JOIN:#channelhere: { mode $chan +a $nick 
/msg $chan $nick has an access level with this bot: 4protector+trusted. }

if ppl with level 150 and 200 gain +a on join, no need to separate them, by the way, you need to check if bot is op on channel

on *:join:#channel:{
   if (($level($nick) isnum 150-200) && ($me isop $chan)) { 
    mode $chan +a $nick
   } 
}
 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.