mIRC Home    About    Download    Register    News    Help

Print Thread
Page 3 of 3 1 2 3
#108060 17/01/05 02:46 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
set -su5 %i on

^ its in the event, its his anti flooder, makes the bot only answer one request every 5 seconds

#108061 17/01/05 02:47 AM
Joined: Nov 2004
Posts: 332
R
Fjord artisan
OP Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
just a simple little antiflood timer deal
everytime one of the help commands is used it sets it to on
and a timer that unsets it after 5 seconds
so you cant call something from the help section faster than every 5 seconds
im sure this isnt the best way but i have to stay with what i can understand

Last edited by ricky_knuckles; 17/01/05 02:48 AM.

The Kodokan will move you, one way or another.
#108062 17/01/05 02:51 AM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
What Iori means is this:

Instead of this:

Code:
#help on
on *:text:!help*:#:{
  if (%i != on) && ($1 == !help) {
    if ($2 == $null) { tokenize 32 - Help }
    if ($ini(help.txt,$2)) {  
      play -t $+ $2 $nick help.txt 2000
      set -su5 %i on
    }
  }
}
#help end


We do this:

Code:
#help on
on *:text:!help*:#:{
  if ($1 == !help) {
    if ($2 == $null) { tokenize 32 - Help }
    if ($ini(help.txt,$2)) {  
      play -t $+ $2 $nick help.txt 2000
      .disable #help
      .timer 1 5 .enable #help   
    }
  }
}
#help end

This provides the same function, without having the if check for %i

You could put it in an alias:

alias nohelp .disable #help | .timer 1 5 .enable #help

and then simply specify "nohelp" after that play command.

Greets


Gone.
#108063 17/01/05 02:57 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
OK, but /play queues requests, mIRC won't /play more than one request at a time. There is also the -qN and -mN switches whch limit the amount of requests that can be queued. smile

#108064 17/01/05 03:13 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
OK, but /play queues requests, mIRC won't /play more than one request at a time. There is also the -qN and -mN switches whch limit the amount of requests that can be queued. smile


Thats my fault he originally was messaging all of it instantly, so i set the plays using 0 delay, so didnt do any -m or -q, but since the lines are short, he could still get caught flooding with a -m1 he would need to put minimal of 3 lines for each section (not a hard feat i guess)

#108065 17/01/05 04:22 AM
Joined: Nov 2004
Posts: 332
R
Fjord artisan
OP Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
if (%i != on) && ($1 == !help) {
if ((%i != on) && ($1 == !help))
edit
certainly was that bit of code is cursed
cursed i tell you

Last edited by ricky_knuckles; 17/01/05 05:42 AM.
#108066 17/01/05 05:06 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Was those red braces symbolize mistakes? Because that is still wrong.

if ((%i != on) && ($1 == !help))

Page 3 of 3 1 2 3

Link Copied to Clipboard