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.

Bot not logging itself on the Channel log; how to change?

General support and discussion of Eggdrop bots.
Post Reply
S
Sarteck
Voice
Posts: 11
Joined: Fri Mar 14, 2008 9:14 pm

Bot not logging itself on the Channel log; how to change?

Post by Sarteck »

My bot is set up to log "jkp" (joins/etc., kicks/etc., and public text in the channel) for the channel, but it does not seem to log itself, nor does it log commands for it posted to that channel.

I imagine I could change the latter simply by changing "jkp" to "cjkp", but I'm not sure how to go about getting it to log it's own public text to the channel. (I don't really see why it doesn't automatically, since it is public text.)

Example ("Boogy" is the bot):


[11:30:51] <~Sarteck> !slots
[11:30:52] <&Boogy> SLOTS! -- Sarteck: [WIN] [WIN] [WIN]
[11:30:52] <&Boogy> Sarteck (Sarteck) WON 10 HAN!

Normally, none of these lines are logged; "!slots" is a command to the bot (which I would imagine would be logged just by adding "c" to the logflags), but I'm not quite sure what would allow Boogy to log its own public text.

Could someone shed some light on the subject for me?
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

The reason your eggdrop does not log text sent to a channel, is because it does not see the text itself (irc servers do not send your text back to you). The only way to facilitate such logging, would be to scan the server-queues for any PRIVMSG commands. This could be done using the "out" binding available in eggdrop 1.6.20, though this might have some performance impact.

As for commands received on the channel (pub bindings to be more precise), the sent command will be logged as a command IF the called proc has a return-value of 1. If the return-value is 0, no logging will be done.

You could also do logging on your own using the putloglev command:

Code: Select all

proc slots {nick host handle chan text} {
....
  putloglev p $chan "SLOTS! -- $nick: \[WIN\] \[WIN\] \[WIN\]"
  puthelp "PRIVMSG $chan :SLOTS! -- $nick: \[WIN\] \[WIN\] \[WIN\]"
...
  return 1
}
NML_375
Post Reply