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.

Channel logging isn't logging chat

General support and discussion of Eggdrop bots.
O
Oliver341
Voice
Posts: 5
Joined: Wed Sep 13, 2006 9:53 am

Channel logging isn't logging chat

Post by Oliver341 »

I upgraded eggdrop to 1.6.18 yesterday and now my channel logfiles are recording everything except public chat (/me's are still recorded). The line in my .conf is still:

logfile pjk #channel "logs/channel.log"

Any ideas why normal chat is excluded from the logs?
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

The answer lies beneath your eyes.
# Logfile flags:
# b - information about bot linking and userfile sharing
# c - commands
# d - misc debug information
# h - raw share traffic
# j - joins, parts, quits, and netsplits on the channel
# k - kicks, bans, and mode changes on the channel
# m - private msgs, notices and ctcps to the bot
# o - misc info, errors, etc (IMPORTANT STUFF)
# p - public text on the channel
# r - raw incoming server traffic
# s - server connects, disconnects, and notices
# t - raw botnet traffic
# v - raw outgoing server traffic
# w - wallops (make sure the bot sets +w in init-server)
# x - file transfers and file-area commands
Once the game is over, the king and the pawn go back in the same box.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

http://www.eggheads.org/news/2006/04/03/32 might shed some light on it
NML_375
O
Oliver341
Voice
Posts: 5
Joined: Wed Sep 13, 2006 9:53 am

Post by Oliver341 »

Thanks for both replies. The "p" (public) flag is set for the logfile command which as I understand it should log standard text sent to the channel. The release info for 1.6.18 RC1 doesn't seem to mention anything about logging (I'm not using RC1 but the full release).

I've downgraded back to 1.6.17 and it's logging properly again.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Added support to MSGM, PUBM, NOTC, and WALL binds to support bound procs returning 1 to prevent logging of the trigger message text.
Most likely this is the reason why it won't log public chat (would mean you got a script loaded that has a pubm-binding, and improper return-value for the associate proc)
NML_375
O
Oliver341
Voice
Posts: 5
Joined: Wed Sep 13, 2006 9:53 am

Post by Oliver341 »

Thanks nml375, I have quite a few binds, I'll check out my pubm's and report back.
O
Oliver341
Voice
Posts: 5
Joined: Wed Sep 13, 2006 9:53 am

Post by Oliver341 »

Well it was a script called chatstats.tcl - I unloaded the script and the bot started logging channels once again. The script must use "return 1" within it. Actually I see "return $c" and such within the script, along with various procs called from various places, I guess I'll be dropping this script :?

Thanks for the help guys.
b
baerchen
Voice
Posts: 5
Joined: Wed Oct 11, 2006 5:22 pm

Post by baerchen »

Speaking for the "latest" version (which is four years old), the script does not "return 1" in its entire code. Nor does it "return $c". In particular not in cs:count, which is its only PUBM associated proc.

Furthermore, I don't see why it should "return 1" in this case, because then - if I understand it correctly - it would log garbage from the channel it is supposed to count, but not to log.

However, I'm just writing an update of the script. If I have misinterpreted something, I would be glad if someone can shed some light on this issue, so I can fix it.

Thanks,

Baerchen
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Well, up until 1.6.18, the returnvalue from calls made by msgm, pubm, and notc would'nt matter at all..
One thing to bare in mind however, is that if you do not specify an explicit return, but just let the proc run to it's end, it will return whatever was returned from the last command within it.
In this case, it would return the result from this:

Code: Select all

incr csa([strftime "%H" [expr $u + $cs(timebalance) * 3600]]$c) $t
I would guess in most cases this would be non-zero (and although the description says return 1, it actually applies to any non-zero return)
NML_375
b
baerchen
Voice
Posts: 5
Joined: Wed Oct 11, 2006 5:22 pm

Post by baerchen »

Thanks nml375.

In other words, any condition that will not run the proc to its end has to be returned 1 in order to make eggdrop log the PUBM. Example:

foreach e $cs(dont) {if {[lsearch $t *$e*] > -1} {return}}

should then be

foreach e $cs(dont) {if {[lsearch $t *$e*] > -1} {return 1}}

Is that correct?

I agree that the last line you quoted will always return a value different from zero. But if it wouldn't, I would also have to finish the proc with "return 1" ?

Thanks,

Baerchen
O
Oliver341
Voice
Posts: 5
Joined: Wed Sep 13, 2006 9:53 am

Post by Oliver341 »

Hey baerchen, good to see you posting. I've used your chatstats script for years and it was a shame I had to unload it. A new version which fixes the logging problem would be great!

(Don't know if you remember me, I'm the one who suggested *!*ident@*.host stats logging to you some time ago)

Hope you're well.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Actally, no:
AS I've understood the patch update, you must make sure your proc returns 0 at all times in order to avoid blocking logs

return and return 0 will produce the same result.
The problem here tho, is that there's no return at the end of cs:count, in which case the return-value of the last issued command (within the proc) is used as return-value.

So, to conclude, you should add return (or return 0) at the end of the proc in order to avoid blocking logs..
NML_375
b
baerchen
Voice
Posts: 5
Joined: Wed Oct 11, 2006 5:22 pm

Post by baerchen »

Oliver341,

unless nml confirms my last posting, I'm not sure I really understood the whole issue. However, once I did it should be no problem to fix that.

Unfortunately I cannot remember your suggestion, but having a brain like a sieve, that doesn't mean much. Additionally, my mail archive from that time has disappeared, so I cannot look it up. I can imagine what you mean, but for the moment and the way CHATstats is designed, this is very hard to implement.

I have already fixed some bugs and added new stuff (no biggies, though). I also changed some command names etc. I hope beta testing will be done by the end of October. If you want to test it with your particular problem, send me an email to

baerchen
dot
chatstats
at
yahoo
dot
de

Thanks,

Baerchen
b
baerchen
Voice
Posts: 5
Joined: Wed Oct 11, 2006 5:22 pm

Post by baerchen »

nml,

thanks for the clarification. I'll add "return 0" and hope to get rid of that .. :-)

Baerchen
s
shiningphoenix
Voice
Posts: 3
Joined: Wed Jul 04, 2007 7:16 am

Post by shiningphoenix »

nml375 wrote:http://www.eggheads.org/news/2006/04/03/32 might shed some light on it
That just gives me more to wonder about. I'm new to eggdrop, so could someone please explain to me what to do so that my bot will log everything that happens in the console channel.
Post Reply