egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

utimer in putdccraw ?

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Elfriede
Halfop


Joined: 07 Aug 2007
Posts: 67

PostPosted: Wed Apr 28, 2010 7:37 am    Post subject: utimer in putdccraw ? Reply with quote

hey Smile
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
View user's profile Send private message
raider2k
Op


Joined: 01 Jan 2008
Posts: 140

PostPosted: Wed Apr 28, 2010 11:43 am    Post subject: Reply with quote

Code:

utimer 1 [list sputraw "PRIVMSG [string tolower $target] :$message"]


where 1 is the value in seconds
Back to top
View user's profile Send private message
Elfriede
Halfop


Joined: 07 Aug 2007
Posts: 67

PostPosted: Fri Apr 30, 2010 4:56 am    Post subject: Reply with quote

thx for helping, but that has no effect
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Fri Apr 30, 2010 12:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
Elfriede
Halfop


Joined: 07 Aug 2007
Posts: 67

PostPosted: Mon May 03, 2010 4:48 am    Post subject: Reply with quote

thank you very much for answering that detailed Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber