| View previous topic :: View next topic |
| Author |
Message |
Elfriede Halfop
Joined: 07 Aug 2007 Posts: 67
|
Posted: Wed Apr 28, 2010 7:37 am Post subject: utimer in putdccraw ? |
|
|
hey
is it possible to build in this proc an utimer, which delays 1s each line ?
i know , putquick.. but 2s delay is to much ^^
| Code: |
proc "sendtext" { target message } {
sputraw "PRIVMSG [string tolower $target] :$message"
}
proc "sputraw" { text } {
set text [string trim $text]
putdccraw 0 [string length $text\n] $text\n
} |
|
|
| Back to top |
|
 |
raider2k Op
Joined: 01 Jan 2008 Posts: 140
|
Posted: Wed Apr 28, 2010 11:43 am Post subject: |
|
|
| Code: |
utimer 1 [list sputraw "PRIVMSG [string tolower $target] :$message"]
|
where 1 is the value in seconds |
|
| Back to top |
|
 |
Elfriede Halfop
Joined: 07 Aug 2007 Posts: 67
|
Posted: Fri Apr 30, 2010 4:56 am Post subject: |
|
|
| thx for helping, but that has no effect |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Fri Apr 30, 2010 12:25 pm Post subject: |
|
|
If I understand your inqury right, you are looking for something sending one line of text every one second?
The current implementation of the queue in eggdrop honors the standard punishment-point system used in most, if not virtually all, ircd's. As such, it calculates an estimate of the current penalty-point, and only sends new commands to the server when there is still "room" (sending commands when you've spent your 10 points is pointless, as the command won't be executed until enough points have diminished anyway).
As the PRIVMSG command generally carries a 2s punishment, the first 5 messages would be sent in a rather fast manner. Any subsequent messages would then have to wait 2seconds for the penalty to drop below the 10s threshold, before being sent. Unless you have a customized private server, there would be no point in trying to override this queue, as the ircd would only parse the command when the penalty is low enough, queueing the command in a buffer meanwhile.
If you do have a private server that excludes your eggdrop from the punishment-system, you could implement a queue-system of your own.
I'd recommend using a global list as a queue, appending new messages to the end. Then, using an utimer, each second grab the first element in that list, send it, and remove it from the list. The commands you'd need for these operations would include: lappend, lindex, and lreplace.
Be adviced that the putdccraw command has been deprecated as of 1.6.20 in favor of putnow, and should not be relied on in the future. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Elfriede Halfop
Joined: 07 Aug 2007 Posts: 67
|
Posted: Mon May 03, 2010 4:48 am Post subject: |
|
|
thank you very much for answering that detailed  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|