This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

My bot has lag, when I loaded a script. Why?

Old posts that have not been replied to for several years.
Locked
c
cerberus_gr
Halfop
Posts: 97
Joined: Fri Feb 07, 2003 8:57 am
Location: 127.0.0.1

My bot has lag, when I loaded a script. Why?

Post by cerberus_gr »

Hello,

I have written a tcl script and after that I loaded it to the bot it has lag. This happens only sometimes as you can see below:

[06:25:37] -> [MyBot] PING
[06:25:38] <MyBot> [06:31] CTCP PING: 1070598337 from mynick (identd@host)
PING reply from MyBot is 2 secs

[06:25:41] -> [MyBot] PING
[06:25:42] <MyBot> [06:31] CTCP PING: 1070598341 from mynick (identd@host)
PING reply from MyBot is 1 secs

[06:25:48] -> [MyBot] PING
[06:25:49] <MyBot> [06:31] CTCP PING: 1070598348 from mynick (identd@host)
PING reply from MyBot is 60 secs

[06:28:02] -> [MyBot] PING
[06:28:04] <MyBot> [06:33] CTCP PING: 1070598482 from mynick (identd@host)
PING reply from MyBot is 4 secs

(see also the time for my irc client).

Two days ago my bot had 5+ minutes lag.

Is there any common mistake, which could make the bot to have such a lag?? Does this happen because I use putquick command? What else would be wrong?


P.S. This happens both in my 2 eggdrops and in all users (my irc client is ok)
P.S.2. Both eggdrops "echoes" that I have pinged them after 1-2 sec, but both of them replys to me after 1+ min (sometimes)
P.S.3. This doesn't happen only in ctcps but in msgs and other types too.
P.S.4. I'm not 100% sure that my tcl has an error.
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

The default ctcp replies use the help queue, so they're the last thing sent out. In other words this "lag" doesn't mean your bot is lagged, but that it's got alot of other stuff to send to the server before your ctcp ping reply is sent :)
Either change the way your scripts do output or make your own ctcp ping reply that use 'putquick' (with the '-next' option?) to ensure it's sent as fast as possible.
Have you ever read "The Manual"?
c
cerberus_gr
Halfop
Posts: 97
Joined: Fri Feb 07, 2003 8:57 am
Location: 127.0.0.1

Post by cerberus_gr »

Thx user, but I found the error in my code...

Code: Select all

if {[string match "[join [lrange [split $tmp +] 0 0]]" "$mask"] || \
    [string match "[join [lrange [split $tmp +] 1 1]]" "$mask"]} {
    return "a [join [lrange [split $tmp +] 5 end]]"; close $chkm
}
As you can see the bot open A LOT of channels, because it first returns and after it closes the file :P
Locked