mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2014
Posts: 24
J
Jokke Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2014
Posts: 24
Hi peeps!

This is the first time I've posted on this forum, I've read thru the forum for a long time, and now I really need your help.

I got this code;

Code:
on *:TEXT:!ts*:#gamerhuset: {
  if ($nick isop #) {
    .msg $chan Hejsa $2-
    .halt
  } 
  .msg $chan Hejsa $Nick
  .ignore $nick
  /timer 1 30 .ignore -r $nick 
}


Since people are spamming !ts in the chat to spam the command, I used /ignore since I'm not the best coder in the world.

But, people have figured it out, and now the whole chat (200+) is spamming the command, making the chat unreadable.


How can I make it timed, so the command(s) can only be used 1 time for 30 seconds for everyone except OPs ?


I tried something like this, but it doesn't work
Code:
on *:TEXT:!test:#jokkebaby: { 
  if ((%floodalt) || ($($+(%,floodalt.,$nick),2)) || ($nick isop #)) { 
    msg $chan Dette er skrald12121.! $+
    .halt
  }
  set -u30 %floodalt On
  set -u30 %floodalt. $+ $nick On
  msg $chan Dette er skrald.! $+
} 


Also, I've searched on google for it and I didn't find anything that could help me. I might have searched for the wrong things, I'm not sure.

Joined: Jun 2014
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
Code:
on *:TEXT:!ts*:#gamerhuset: {
  if ($nick isop #) {
    .msg $chan Hejsa $2-    
  } 
  else {
    if (($($+(%,commandspam.,$nick),2) == On )  || ($($+(%,commandspam.,$chan),2) == On ))  { return }
    .msg $chan Hejsa $Nick
    set -u30 %commandspam. $+ $nick On
    set -u5 %commandspam. $+ $chan On
  }
}


Last edited by Belhifet; 14/12/14 11:39 PM.
Joined: Dec 2014
Posts: 24
J
Jokke Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2014
Posts: 24
Originally Posted By: Belhifet
Code:
on *:TEXT:!ts*:#gamerhuset: {
  if ($nick isop #) {
    .msg $chan Hejsa $2-    
  } 
  else {
    if (($($+(%,commandspam.,$nick),2) == On )  || ($($+(%,commandspam.,$chan),2) == On ))  { return }
    .msg $chan Hejsa $Nick
    set -u30 %commandspam. $+ $nick On
    set -u5 %commandspam. $+ $chan On
  }
}



Correct me if I'm wrong, doesn't this script just "ignore" the person for 30 second? Or will it ignore all commands in the chat for 30 seconds?

also, is OP still allowed to use it in the 30 seconds, like so I can do !ts 4 times in a row, and they can only do one?

Joined: Jun 2014
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
It ignores all commands that use that command spam variable to filter. It sets one for both the nick and the channel incase you wanted to set them to different times.

And yes, an op can spam all day if they want.

Joined: Dec 2014
Posts: 24
J
Jokke Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2014
Posts: 24
Originally Posted By: Belhifet
It ignores all commands that use that command spam variable to filter. It sets one for both the nick and the channel incase you wanted to set them to different times.

And yes, an op can spam all day if they want.


A last question about this awesome work!


If I use the same variable thru the whole script, thinking over 20 commands, will it bug, or will it make the commands useless for 30 seconds?

Joined: Jun 2014
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
if you use %commandspam.$nick is will lock that person out from all those commands. You can use a different variable for each command if you want, like commandspam2,3,4,5,6, or w/e depending on how you'd like it to function.

Joined: Dec 2014
Posts: 24
J
Jokke Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2014
Posts: 24
Thank you very much! I got everything working laugh


Link Copied to Clipboard