Advanced Bot Request Script With Blacklist
I know I already posted a bot request script, but this one is very long and it advanced, this time it even has a blacklist, you need to edit "#iCCG" with your bot request channel, and also replace if ($nick == CCG || $nick == ComputerCoderGuy) with the nicks you want to let to be able to add to the blacklist,
below are the triggers:
./blacklist add channel (adds a channel to the blacklist)
./blacklist del channel (removes a channel from the blacklist)
!request channel email (to request your bot)
./info (Trigger to type into a channel for request info)
####################################
#Copyright ComputerCoderGuy 2010 #
#http://www.computercoderblog.co.cc#
####################################
on *:TEXT:./blacklist add*:#: {
if ($nick isop #iCCG ) {
%blacklist- [ $+ [ $3 ] ] = true
msg #iCG $3 has been added to my blacklist
}
else {
msg #iCCG Sorry $nick $+ , you do not have permission to add channels to the blacklist
}
}
on *:TEXT:./blacklist del*:#: {
if ($nick isop #iCCG ) {
/unset %blacklist- [ $+ [ $3 ] ]
msg #iCCG $3 Has been removed from the blacklist
}
else {
msg #iCCG Sorry $nick $+ , you do njot have permission to remove channel's from my blacklist
}
}
on *:TEXT:./info:#:{
notice $nick My Info For $chan Is Below.
notice $nick The Nick Of The Person That Requested Me: %requestN. [ $+ [ $chan ] ]
notice $nick The Email Of The Person That Requested Me: %requestE. [ $+ [ $chan ] ]
notice $nick The Time I Was Requested: %requestT. [ $+ [ $chan ] ]
notice $nick The Date I Was Requested: %requestD. [ $+ [ $chan ] ]
notice $nick -----End Of $chan $+ 's Info-----
}
on *:TEXT:!request *:#: {
if ($nick == CCG || $nick == ComputerCoderGuy) {
msg #iCCG Yes my great master.......
msg #iCCG I will join $2 at once
/j $2
/ns ajoin add $2
msg $2 $2 Has been added to my ajoin
}
elseif (%blacklist- [ $+ [ $2 ] ] = true) {
msg #iCCG $2 is on my blacklist, you can not request me to $2
}
else {
%requestrnum- [ $+ [ $nick ] ] = $r(50000,99999)
/msg $nick You confirm code for requesting $me is: %requestrnum- [ $+ [ $nick ] ]
/msg $nick To confirm your request type:
/msg $nick !confirm $2 %requestrnum- [ $+ [ $nick ] ]
/msg $nick In #iCCG
msg #iCCG You should have recieved a PM showing your confirm code and details about requesting $me
msg #iCCG Once you do what is said in the PM, $me should join $2
}
}
on *:TEXT:!confirm *:#: {
if ($3 == %requestrnum- [ $+ [ $nick ] ]) {
msg #iCCG Code correct!
msg #iCCG I should join $2 straight away
/j $2
/ns ajoin add $2
msg $2 $2 Has been added to my ajoin list
msg $2 Thank you for requesting me,
msg $2 Thanks
%requestE. [ $+ [ $2 ] ] = $2
%requestN. [ $+ [ $2 ] ] = $nick
%requestT. [ $+ [ $2 ] ] = $asctime(hh:nn:ss TT)
%requestD. [ $+ [ $2 ] ] = $date
}
else {
msg #iCCG Incorrect code! Please try again
}
}
"you need to edit "#iCCG" with your bot request channel"
instead of making the user replace all instances of #iCCG which at a quick glance is far more than just a few. i would suggest using an alias so universal changes such as replacing channels wont be a tedious task.
Alias BotChan { return #iCCG }
Making in depth changes easy, your code more user friendly, and easier to manage.
Turning something like this -
else {
msg #iCCG Incorrect code! Please try again
}
to something like this
else {
msg $botchan Incorrect code! Please try again
}