I am trying to add flood control to my script. This is what I have tried
else {
var %get $+(#,.,$1)
var %name $1
var %text $readini(cmds.ini,%get,text)
if (!%text) {
/msg # No such command available.
}
else {
if (%flood%name) { return }
set -u30 %flood%name On
/msg # %text
}
}
and
else {
var %get $+(#,.,$1)
var %name $1
var %text $readini(cmds.ini,%get,text)
if (!%text) {
/msg # No such command available.
}
else {
if (%flood $+ %name) { return }
set -u30 %flood $+ %name On
/msg # %text
}
}
The first version always sets the flood to %flood%name and disables every command which is not what I would like.
The second version makes it so I can't use any of the commands.
How can I make it so it only adds a flood control to a single command?