on $*:text:/^!addcom !?(\S+)/iS:#:{
if ($nick !isop #) { msg # Sorry $nick - You don't have permission to do that. | return }
writeini commands.ini # $regml(1) $3-
var %text $read(commands.txt,1)
if %text == $null {
var %line Commands List: ! $+ $regml(1) $+ ,
}
else {
var %line %text ! $+ $regml(1)
}
write -l1 commandsresonse.txt %line
msg # $nick - The command $$2 has been added.
}
on $*:text:/^!delcom !?(\S+)/iS:#:{
if ($nick !isop #) { msg # Sorry $nick - You don't have permission to do that. | return }
remini commands.ini # $regml(1)
var %text $read(commands.txt,1)
if %text != $null {
var %line $remove(%text,! $+ $regml(1))
}
write -l1 commandsresonse.txt %line
msg # $nick - The command $$2 has been removed.
}
on $*:text:/^!editcom !?(\S+)/iS:#:{
if ($nick !isop #) { msg # Sorry $nick - You don't have permission to do that. | return }
elseif ($readini(commands.ini,n,#,$regml(1))) {
writeini commands.ini # $regml(1) $$3-
msg $chan $nick -> The command $2 has been updated.
}
Else msg # Sorry, that command does not exist.
}
on $*:text:/^!(\S+)/:#:{
if ((%floodcom) || ($($+(%,floodcom.,$2),2))) { return }
set -u10 %floodcom On
set -u30 %floodcom. $+ $nick On
if ($readini(commands.ini,n,#,$regml(1))) msg # $v1
}
This is what I am using for mods in chat to be able to add, edit and delete commands. Is there a way to make the commands they add have a flood so it takes a while for the command to be posted again. If someone could help, that would be really appreciated.