mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2004
Posts: 10
M
MRic3 Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Aug 2004
Posts: 10
I have a script that reads from a (big) hash table and the notice's the chatter...

The hash tableis big so it wil flood the user... frown
How to time the notice's
Code:
  [color:green] alias flitsers {
  %rss.nummer = 2
  :nextflits
  if $hget(rssfeed,<description> $+ %rss.nummer) {
    timer 1 2 notice %rss.nick $hget(rssfeed,<description> $+ %rss.nummer) 
    inc %rss.nummer
    goto nextflits  
  }
  unset %rss.* 
}
 [/color]  


Why does the timer not work properly???

p.s. i did a search on this forum on flood but there was nothing i think i could use....

Last edited by MRic3; 16/08/04 08:09 PM.
Joined: Aug 2003
Posts: 314
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
All the /timer commands are performed in the same process almost instantaneously, so all notices will occur within 2 seconds of performing that alias. You can use %rss.nummer to generate a delay, so if you want a two second delay between each notice use the following:

.timer 1 $calc(2*(%rss.nummer -2)) .notice %rss.nick $hget(rssfeed,<description> $+ %rss.nummer)

So the first notice is sent after 0 seconds (after the alias finishes processing) and the next occurs 2 seconds after that and so on. The . in .timer and .notice makes the commands quiet, you will not see the output i.e. you will not see all those timers being initiated and you will not see the notice being sent

Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Another way would be to make use of /play smile

alias flitsers {

  • var %i = 2,%a = $ticks $+ .txt
    [color:green] ; %i is the loop counter
    ; %a is a unique filename for the output (similar to 123456.txt)

    while $hget(rssfeed,<description> $+ %i) { write %a $v1 | inc %i }
    ; ^ writes all the output to the file

    .play -n %rss.nick %a 1500
    ; /play -n sends the lines via /notice
    .remove %a
}[/color]

This will send the results with a 1500ms (1.5 second) delay between lines sent.

Joined: Aug 2004
Posts: 10
M
MRic3 Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Aug 2004
Posts: 10
I tried both variantions and they do work ..
but still many clients block the bot because it floods...
maybe their timers are to tight ???

I increased the timers drasticly to 5 sec per line.. no effect..
I think i have to find a different way to push the info....
Maybe i'll just DCC the info (file) wink


Link Copied to Clipboard