This is a simple bot script use it as needed
on @*:TEXT:*:#:{
if ($nick(#,$nick,oh)) {
tokenize 32 $strip($1-)
if ($1 = .kick) {
kick # $2 $iif($3-,$v1,No Reason)
.notice $nick $2 Has been kicked!
}
elseif ($1 = .ban) {
mode # +b $address($2,2)
.notice $nick $2 Has been Banned
}
elseif ($1 = .kb) {
ban -k # $2 2 $iif($3-,$v1,No Reason)
.notice $nick $2 Has been kicked and banned.
}
elseif ($1 = .Mod) {
mode # +m
.msg # This Channel is + strick moderet voice only
}
elseif ($1 = .unMod) {
mode # -m
.msg # The moderation voice has now been de active.
}
}
}
Its The Tails.
im trying to tell him we should set it up like that so it makes a point of us regging rooms.
Right now he is fixing database probs.
But either way the users dont know how to reg rooms so we end up doing it.
Also, Having a server when people can reg there own rooms makes it pointless to keep up with
security wise.
Jethro_ is an net admin on most ircd servers =P
An to extremity and python using
on @*:TEXT:*:#:{
if ($nick(#,$nick,oh)) {
the @ in the text event takes care of the checking if the bot/client running the code is +o in the chan, and the if ($nick(#,$nick,oh)) { makes sure the client triggering the code is either +o or +h in the chan.
I think the first if statement should be && and not ||. If user is op AND you are op, versus If user is op OR you are op.. otherwise it still tries to work if you are not op.
There are a few other things beyond what napa and jethro are suggesting (which are very valid), but not relevant to functionality.
Ask away if you need help adding what they suggested. Keep up the work!
Like napa stated, implementing some checks are recommended. The crucial one has to be
if ($2 ison $chan) {
because if someone mistypes or enters something else other than an actual nickname in the channel where you have the code run, you'll get an error. Last but not least, a trigger flood check is advised, just in case an op or halfop gets bananas for whatever reason to screw up the client that runs the code by way of flooding. Better safe than sorry!
you have missed placed brackets an have things in the wrong place in ur snippet.
In keeping with your original code, and so you can understand here is an working example an nothing more then that.
you may want to add error checks to it as well
on @*:TEXT:*:#:{
if ($nick(#,$nick,oh)) {
tokenize 32 $strip($1-)
if ($1 = .kick) {
kick # $2 $iif($3-,$v1,No Reason)
.notice $nick $2 Has been kicked!
}
elseif ($1 = .ban) {
mode # +b $address($2,2)
.notice $nick $2 Has been Banned
}
elseif ($1 = .kb) {
ban -k # $2 2 $iif($3-,$v1,No Reason)
.notice $nick $2 Has been kicked and banned.
}
elseif ($1 = .Mod) {
mode # +m
.msg # This Channel is + strick moderet voice only
}
elseif ($1 = .unMod) {
mode # -m
.msg # The moderation voice has now been de active.
}
}
}