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.

Odd 'putserv' behavior in eggdrop1.6.4

Old posts that have not been replied to for several years.
Locked
M
Mikee

Post by Mikee »

[I am relaying this situation as it was presented to me by another person, it puzzled me so I brought the topic here on this person's behalf]

BACKGROUND
Person created a 'quote' script which teaches the bot how to send a random quote message to a channel when !quote is typed by another channel member.

The usage of putserv in question is such (this is pseudo-TCL, i don't know it that well):
if ( $quote != "" )
{
putlog "Quote existed: $quote"
putserv $chan "$quote"
}
else
{
putserv $chan "quote did not exist"
}

PROBLEM
Upon testing this script the person discovered that even though every single time he typed !quote in the channel, the putlog would report in his DCC console "Quote existed". However, the eggdrop would not always seem to get the actual quote out to the server. For example, this person would send !quote to the channel 3 times in quick succession, and the bot would respond with only 2 quotes. Yet still in the DCC console there would be 3 putlog reports saying "Quote existed: <quote>".

QUESTION
Why is putserv eggdrop1.6.4 behaving in such a way that it (seemingly randomly) decides to discard output queued by 'putserv'? Note the person also tried 'puthelp' as an alternative with the same results.
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

Because you haven't set whatever queue your sending it to not to allow duplicate entries.
From eggdrop.complete.conf

# [0/1] allow a msg being twice in a queue?
set double-mode 0
set double-server 0
set double-help 0

Whichever queue your're using (the server queue in the case of putserv), has to have that value set to 1 (though why you'd want the bot to repeat the same thing that quick in succession is beyond me)
M
Mikee

Post by Mikee »

The messages are not duplicate. In the example I described, the quotes retrieved were different for all 3 cases.

Also, I did not define what 'quick succession' meant. The person would type
!quote, await a response (or wait 30 seconds for no response), and type !quote again.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Did the quotes have any high-bit characters in them? High-bit characters are characters whose ascii value is above 127, such as ÈÉÊâãä. I forget what version it was fixed in, but for a while, special characters like that could cause eggdrop to lose server output.

This only applies if your tcl version is 8.1 or up.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

If this is not a high-bit char problem, then we would need to see the exact code.

There may also be more information available in console modes such as +d. Not all error messages display unless the correct console settings are enabled.
G
Guest

Post by Guest »

It is not a high-bit-char problem, and we have tried both +d(ebug) console messages (saw nothing regarding duplicate messages, which is what I expect since the messages weren't infact duplicates) and +r(aw) to see if something silly was going on with the server. Neither option revealed anything new.
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

Try +v and see what the bot is sending the server.
G
Guest

Post by Guest »

Enabling +v wouldn't really help much from our perspective, maybe that of a developer. Because I can verify the bot is using 'putserv "PRIVMSG..."' each time, so for that to become malformed before heading out to the server just tells me something that I think I already know, the outbound message processing is screwed up [on this particular bot].

<font size=-1>[ This Message was edited by: MikeeHome on 2001-11-07 22:59 ]</font>
M
Mikee

Post by Mikee »

This problem could not be reproduced on eggdrop1.6.6, however I see nothing in UPDATES1.6 about this for 1.6.5 or 1.6.6.
Locked