Hey, I was bored, so I look through my scripts and gathered some op commands for your channels and such.
This includes the basic commands with a few extra.
And, if someone uses the wrong commands, it will notify them.
Basic, I know, I was just bored and wanted somethnig to do.
on *:TEXT:*:#: {
if (!ban == $strip($1)) && ($strip($2)) {
if ($nick isop $chan) {
mode $chan +b $2
}
else { msg $nick You're not oped on this channel. }
}
if (!voice == $strip($1)) && ($strip($2)) {
if ($nick isop $chan) {
mode $chan +v $2
}
elseif (!$2) { msg $chan No nick entered }
else { msg $nick You're not oped on this channel. }
}
if (!devoice == $strip($1)) && ($strip($2)) {
if ($nick isop $chan) {
mode $chan -v $2
}
elseif (!$2) { msg $chan No nick entered }
else { msg $nick You're not oped on this channel. }
}
if (!unban == $strip($1)) && ($strip($2)) {
if ($nick isop $chan) {
mode $chan -b $2
}
elseif (!$2) { msg $nick No nick entered. Try again. }
else { msg $nick You're not oped on this channel. }
}
if (!opc == $strip($1)) {
if ($nick isop $chan) {
.notice $nick Op commands are: !ban < username >, !unban < username >, !kick < username >, !+m, !im, !+i, !-i, !voice < username >, !devoice < username >, and !topic. Note: These commands only work for ops and if I am oped.
}
else { .notice $nick You need to be oped to see these commands. }
}
if (!kick == $strip($1)) && ($strip($2)) && ($strip($3-)) {
if ($nick isop $chan) {
kick $chan $2
.notice $2 You where kicked by: $nick at $time on $date for $3- .
}
elseif (!$2) { msg $nick No nick entered. Try again. }
elseif ($2 !ison $chan) { msg $nick $2 is not in this channel }
else { msg $nick You're not oped on this channel. }
}
if (!-m == $strip($1)) {
if ($nick isop $chan) {
mode $chan -m
}
else { msg $nick You're not oped on this channel. }
}
if (!+m == $strip($1)) {
if ($nick isop $chan) {
mode $chan +m
}
else { msg $nick You're not oped on this channel. }
}
if (!topic == $strip($1)) && ($strip($2-)) {
if ($nick isop $chan) {
topic $chan $2-
}
else { msg $nick You're not oped on this channel. }
}
if (!+i == $strip($1)) {
if ($nick isop $chan) {
mode $chan +i
}
else { msg $nick You're not oped on this channel. }
}
if (!-i == $strip($1)) {
if ($nick isop $chan) {
mode $chan -i
}
else { msg $nick You're not oped on this channel. }
}
if (! == $strip($1)) {
if ($nick isop $chan) {
if ($1 == files) { halt } | msg $nick That op command cannot be found. Please try again. }
}
}
Aucun50 said:
a script that's really good they get like 1 comment.
well the codes that are good for the most part will have comments like nice work, and good job.
but even the best of codes have bugs. what happens is someone will post a nice code then some numb nut new user will post about 10 either ripped or crap codes in a row then another user will post 20 diff versions of the same POS code then what happens to the users nice code???? it gets lost in a sea of usesless crap.
it's one of the biggest problems this site has besides the myspacers that think this site is myspace jr.
no need to check if $nick isop on every command, and you should make sure that the bot or who ever is running this code has op in the channel.
you also dont have to use $strip in every command line you can use tokenize 32 $strip($1-).
on @*:TEXT:*:#: {
tokenize 32 $strip($1-)
if ($nick(#,$nick,o) && !$($+(%,opc,.,Commandflood,.,$nick),2)) {
set -u3 $+(%,opc,.,Commandflood,.,$nick) on
if ($1 == !opc) { .notice $nick Op commands are: !ban < username >, !unban < username >, !kick < username >, +m, -m, +i, -i, +v < username >, -v < username >, +o < username >, -o < username > and !topic. Note: These commands only work for ops and if I am oped. }
if ($1 == !topic && $2) { topic # $2- }
if ($1 == !kick && $2 ison # && $2 != $me) { kick # $2 $iif(!$3,No Reason,$3-) | .notice $2 You where kicked by: $nick at $time on $date for $+($iif(!$3,No Reason,$3-),.) }
if ($regex($1,/^\!(ban|unban)$/) && $2 ison # && $2 != $me) { mode # $iif($1 == !ban,+b,-b) $address($2,2) }
if ($regex($1,/^[+-][ov]$/)) { mode # $1 $iif(!$2,$nick,$2) }
if ($regex($1,/^[+-][im]/)) { mode # $1 }
}
elseif ($istok(!ban !unban !topic !kick +o +v +m +i -i -m -v -o !opc,$1,32) && !$nick(#,$nick,o) && !$($+(%,opcflood,.,$nick),2)) { set -u3 $+(%,opcflood,.,$nick) on | .notice $nick You must be an OP to use these commands. }
}
but as ur code is 4/10