egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

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

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
Sarteck
Voice


Joined: 14 Mar 2008
Posts: 11

PostPosted: Tue Sep 13, 2011 2:00 pm    Post subject: Bot not logging itself on the Channel log; how to change? Reply with quote

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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Tue Sep 13, 2011 2:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber