on *:text:!addcom *:#: {
if ($nick isop #) {
write commands.txt $2-
msg $chan /me + Command $2 has been created!
}
}
on *:text:!delcom *:#: {
if ($nick isop #) {
if ($read(commands.txt, ns, $2)) {
write -dl $+ $readn commands.txt
msg $chan /me - Command $2- has been removed!
}
}
}
on *:text:!editcom & *:#: {
if ($nick isop #) {
if ($read(commands.txt, ns, $2)) {
write -l $+ $readn commands.txt $2-
msg $chan /me -> Command $2 has been edited!
}
}
}
on *:text:*:#: {
tokenize 32 $strip($1-,burci)
if ($read(commands.txt, ns, $1)) {
var %com = $v1
if (-ul=mod == $gettok(%com,1,32)) && ($nick !isop $chan) { msg $chan [ $+ $nick $+ ]: Error, You are NOT an channel operator! | return }
msg $chan $gettok(%com,2-,32)
}
}