This is a bot system made by myself. I have a bit if fixing and finally it works real well. So this is how it works.
Oh yea to turn on the bot type /enable #botmode
To turn it off type /disable #botmode
That is all. If you have some problems please e-mail me at DuelistMaster9@hotmail.com Thanks.
;Bot Control made by DuelistMaster
;This is the evaluated version not the complete version
;So if you need help e-mail me at duelistmaster9@hotmail.com
alias AddAccess2000 {
/guser 2000 $$1
}
alias DelAccess2000 {
/ruser 2000 $$1 $+ !
}
alias AddAccess1500 {
/guser 1500 $$1
}
alias DelAccess1500 {
/ruser 1500 $$1 $+ !
}
alias AddAccess1000 {
/guser 1000 $$1
}
alias DelAccess1000 {
/ruser 1000 $$1 $+ !
}
alias AddAccess500 {
/guser 500 $$1
}
alias DelAccess500 {
/ruser 500 $$1 $+ !
}
menu nicklist {
.AddAccess20:/addaccess2000 $$1 | /notice $$1 You are access to the me. Please type `help in the channel for more details.
.DelAccess20:/delaccess2000 $$1
.AddAccess15:/addaccess1500 $$1 | /notice $$1 You are access to the me. Please type `help in the channel for more details.
.DelAccess15:/delaccess1500 $$1
.AddAccess10:/addaccess1000 $$1 | /notice $$1 You are access to the me. Please type `help in the channel for more details.
.DelAccess10:/delaccess1000 $$1
.AddAccess5:/addaccess500 $$1 | /notice $$1 You are access to the me. Please type `help in the channel for more details.
.DelAccess5:/delaccess500 $$1
}
#botmode on
on *:text:`help*:*:{ notice $nick Here are the commands for me | notice $nick The commands are `owner <nick> `deowner <nick> `protect <nick> `deprotect <nick> `op <nick> `deop <nick> `halfop <nick> `dehalfop <nick> `voice <nick> `devoice <nick> `kick <nick> <reason> `kban <nick> <reason> `ban <nick> `say <message> `action <action> }
on 2000:text:`owner*:*:{
if ($2 = $null) {
mode # +q $nick
}
else { mode # +q $2 }
}
on 2000:text:`deowner*:*:{
if ($2 = $null) {
mode # -q $nick
}
else { mode # -q $2 }
}
on 1500:text:`protect*:*:{
if ($2 = $null) {
mode # +a $nick
}
else { mode # +a $2 }
}
on 1500:text:`deprotect*:*:{
if ($2 = $null) {
mode # -a $nick
}
else { mode # -a $2 }
}
on 1000:text:`op*:*:{
if ($2 = $null) {
mode # +o $nick
}
else { mode # +o $2 }
}
on 1000:text:`deop*:*:{
if ($2 = $null) {
mode # -o $nick
}
else { mode # -o $2 }
}
on 1000:text:`halfop*:*:{
if ($2 = $null) {
mode # +h $nick
}
else { mode # +h $2 }
}
on 1000:text:`dehalfop*:*:{
if ($2 = $null) {
mode # -h $nick
}
else { mode # -h $2 }
}
on 1000:text:`voice*:*:{
if ($2 = $null) {
mode # +v $nick
}
else { mode # +v $2 }
}
on 1000:text:`devoice*:*:{
if ($2 = $null) {
mode # -v $nick
}
else { mode # -v $2 }
}
on 1000:text:`kick*:*:{
if ($2 = $null) {
kick # $nick Requested by $nick
}
else { kick # $2 Requested by $nick Reason: $3- }
}
on 1000:text:`kban*:*:{
if ($2 = $null) {
ban # $nick 2 | kick # $nick Requested by $nick
}
else { ban # $nick 2 | kick # $2 Requested by $nick Reason: $3- }
}
on 1000:text:`ban*:*:{
if ($2 = $null) {
ban # $nick 2
}
else { ban # $nick 2 }
}
on 500:text:`say*:*:{ msg $chan $2- }
on 500:text:`action*:*:{ describe $chan $2- }
on 2000:text:`nick*:*:{ nick $$2- }
#botmode end
OK my last one then I\'m gonna shut up for a little while at least. An example to make the kicks work from a msg to the bot:
on 500:text:kick*:*:{ if ($2 == $me) { msg $chan You missed me! } elseif ($2 == $nick) { msg $chan Noway, you\'re my buddy } else { .kick $3 $2 Requested by $nick } } Thus to operate it you can /msg <botname>
kick <#chan>. Works across chans, so if you msg the bot from #chan1 to kick nick in #chan2 provided bot has ops there and nick is there, it will perform the function even if you\'re not there to witness it other than through the bot.
For a start, you have often confused the $nick and $2 items. Instead of banning $2 onban, it instead bans the nick that requested it, even if that nick is owner. Thus: on 1000:text:
ban::{
if ($2 = $null) {
ban # $nick 2
}
else { ban # $nick 2 }
}
Should be:
ban # $2 2
}
AND I don\'t know what the extra \'else\' condition is here if its the same as the previous condition? or it reads that if ($2 != $null) then kick any way which makes you wonder why $null line was included. The same idea of mixing $2 and $nick in the kick command. If I wanted to get kicked from a chan I don\'t need my own bot to do it for me :P Where you have, for example, ...text:
ban:: ... you might as well make it ban*:#: because a msg to the bot won\'t execute a command until the channel is specified. Using # executes on a command in the channel. So even using
ban*:?: will not work until there has been a channel specified. If you want the commands on kick and ban to be executed through message and not in the channel then you need to place into the snippet a way for the bot to define the channel in which to execute the command. It might mean that the msg to the bot includes for example. I realise you\'re still working on it, but frankly, a 9 for this piece of code is a little on the steep side of scoring with some fundamental errors.