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 

log own messages

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


Joined: 18 Sep 2008
Posts: 6

PostPosted: Tue Sep 23, 2008 4:48 am    Post subject: log own messages Reply with quote

I'm trying to write a tcl script that, besides sending text to a channel, also logs that same text to the channel's logfile

I just need a simple code, something like:

putserv "PRIVMSG #mychan :hello"
putlog #mychan "hello"

can someone post the correct syntax for the putlog (or putcmdlog or putxferlog or putloglev, whichever works best) command for the example above
_________________
Driber.net webmaster
Back to top
View user's profile Send private message Visit poster's website
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Tue Sep 23, 2008 12:58 pm    Post subject: Reply with quote

putlog <message>

In your case, something like this:
Code:
puthelp "PRIVMSG #mychan :hello"
putlog "#mychan \"hello\""


That is, you must make sure the message is a single argument, regardless whether it contains spaces or not. To have greater control of where things are logged, use the putloglev command; putloglev <level> <channel> <text>:
Code:
puthelp "PRIVMSG #mychan :hello"
putloglev p "#mychan" "<mybot> hello"
#log the message "<mybot> hello" as public chatter (p) on channel #mychan

_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Driber
Voice


Joined: 18 Sep 2008
Posts: 6

PostPosted: Thu Sep 25, 2008 3:41 am    Post subject: Reply with quote

Code:
putloglev p "#mychan" "<mybot> hello"


thanks, nml375, that works perfect
_________________
Driber.net webmaster
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting 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