|
Joined: May 2014
Posts: 13
Pikka bird
|
OP
Pikka bird
Joined: May 2014
Posts: 13 |
Lately I've been using a flood protection for my commands, which works well, but activating one command starts the cooldown for another command as well, rendering multiple commands unable to be used near each other, even with different timers. if ((%floodcommands) || ($($+(%,floodcommands.,$nick),3))) { return }
set -u10 %floodcommands On
set -u15 %floodcommands. $+ $nick On
I tried looking around here for a different one that would work, but this one I found sets the cooldown for all channels instead of all commands. if (%hi > 60) return
inc -z %hi 30
Is there a way to make it so neither of these issues happen? I'm trying to use this in multiple Twitch chats.
|
|
|
|
Joined: Jun 2014
Posts: 248
Fjord artisan
|
Fjord artisan
Joined: Jun 2014
Posts: 248 |
if ((%floodcommands) || ($($+(%,floodcommands.,$nick),3))) { return }
set -u10 %floodcommands On
set -u15 %floodcommands. $+ $nick On
This one has the same issue you described with the other, it will disable command across all channels.
if ($($+(%,floodcommands.,$chan),2))) || ($($+(%,floodcommands.,$chan,.,$nick),2))) { return }
set -u10 %floodcommands. $+ $chan On
set -u15 %floodcommands. $+ $chan $+ . $+ $nick On
Here we've added the channel to the dynamic portion of the variable.
if ($($+(%,floodgreet.,$chan),2))) || ($($+(%,floodgreet.,$chan,.,$nick),2))) { return }
set -u10 %floodgreet. $+ $chan On
set -u15 %floodgreet. $+ $chan $+ . $+ $nick On
Here we've used a different static portion of our dynamic variable. Does this help?
|
|
|
|
Joined: May 2014
Posts: 13
Pikka bird
|
OP
Pikka bird
Joined: May 2014
Posts: 13 |
Ah, I didn't know you could change the floodcommands to floodgreet or whatever you wished, that would certainly help a lot. However, when trying to execute the script using the flood script you showed me with the channel dynamic, it gives me the error "/if: invalid format (line 2, remote.ini)" Here's the script so far on *:TEXT:!ban*:#: {
if ($($+(%,floodcommands.,$chan),2))) || ($($+(%,floodcommands.,$chan,.,$nick),2))) { return }
set -u10 %floodcommands. $+ $chan On
set -u15 %floodcommands. $+ $chan $+ . $+ $nick On
msg $chan Now why would you want to do that? $$2 seems like a cool cat, unlike you, $nick Jebaited }
|
|
|
|
Joined: Jun 2014
Posts: 248
Fjord artisan
|
Fjord artisan
Joined: Jun 2014
Posts: 248 |
on *:TEXT:!ban*:#: {
if ($($+(%,floodcommands.,$chan),2)) || ($($+(%,floodcommands.,$chan,.,$nick),2)) { return }
set -u10 %floodcommands. $+ $chan On
set -u15 %floodcommands. $+ $chan $+ . $+ $nick On
msg $chan Now why would you want to do that? $$2 seems like a cool cat, unlike you, $nick Jebaited
}
Probably cause I had too many brackets
|
|
|
|
Joined: May 2014
Posts: 13
Pikka bird
|
OP
Pikka bird
Joined: May 2014
Posts: 13 |
That worked perfectly, thank you very much
|
|
|
|
|