| View previous topic :: View next topic |
| Author |
Message |
Sarteck Voice
Joined: 14 Mar 2008 Posts: 11
|
Posted: Tue Sep 13, 2011 2:00 pm Post subject: Bot not logging itself on the Channel log; how to change? |
|
|
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? |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Tue Sep 13, 2011 2:18 pm Post subject: |
|
|
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: | 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, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
|
|
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
|
|