mIRC Home    About    Download    Register    News    Help

Print Thread
#210369 13/03/09 04:35 PM
Joined: Jan 2008
Posts: 8
A
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Jan 2008
Posts: 8
My flood protection, which previously worked just fine, won't work anymore, and I have no idea why, anyone?

off $*:text:/why.*\?$/:#:{ if (%Flood.Protection == on) { halt } else { set -u30 %Flood.Protection on | msg $chan Because I said so. } }

Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
try this:

Code:
ON $*:text:/why.*\?$/:#:{ if (%Flood.Protection == on) { .halt } else { .set -u30 %Flood.Protection on | msg $chan Because I said so. } }


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Jan 2008
Posts: 8
A
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Jan 2008
Posts: 8
I just ran a test while waiting for a reply, with this line:
Code:
on *:TEXT:!test:#:{ if { %Flood.Protection == on } { halt } else { set -u30 %Flood.Protection on | msg $chan Do it more than thrice and I'll kick you. :D } }

I got this response in my server window:
Code:
* /if: invalid format

Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
lol, try this men

Code:
on *:TEXT:!test:#:{ 
  if {%Flood.Protection == on} {
    .halt
  }
  else { .set -u30 %Flood.Protection on | msg $chan Do it more than thrice and I'll kick you. :D }
}



Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Jan 2008
Posts: 8
A
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Jan 2008
Posts: 8
I copypasted that exactly, and the flood protection didn't work at all. -_-

Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Your original script is fine, you just need to do a | before the else:

Code:
ON $*:text:/why.*\?$/:#:{ if (%Flood.Protection == on) { .halt } | else { .set -u30 %Flood.Protection on | msg $chan Because I said so. } }


Here's a shorter version however:

Code:
on $*:text:why.*\?$/:#:{
  if (!%flood.protection) {
    inc -u30 %flood.protection
    msg $chan Because I said so.
  }
}

hixxy #210377 13/03/09 05:07 PM
Joined: Jan 2008
Posts: 8
A
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Jan 2008
Posts: 8
*facepalm* I can't believe I didn't notice that. Thank you hixxy.


Link Copied to Clipboard