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.

log own messages

Help for those learning Tcl or writing their own scripts.
Post Reply
D
Driber
Voice
Posts: 6
Joined: Thu Sep 18, 2008 8:22 am
Contact:

log own messages

Post by Driber »

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
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

putlog <message>

In your case, something like this:

Code: Select all

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: Select all

puthelp "PRIVMSG #mychan :hello"
putloglev p "#mychan" "<mybot> hello"
#log the message "<mybot> hello" as public chatter (p) on channel #mychan
NML_375
D
Driber
Voice
Posts: 6
Joined: Thu Sep 18, 2008 8:22 am
Contact:

Post by Driber »

Code: Select all

putloglev p "#mychan" "<mybot> hello" 
thanks, nml375, that works perfect
Driber.net webmaster
Post Reply