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.
Help for those learning Tcl or writing their own scripts.
Driber
Voice
Posts: 6 Joined: Thu Sep 18, 2008 8:22 am
Contact:
Post
by Driber » Tue Sep 23, 2008 4:48 am
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
nml375
Revered One
Posts: 2860 Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 » Tue Sep 23, 2008 12:58 pm
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
Driber
Voice
Posts: 6 Joined: Thu Sep 18, 2008 8:22 am
Contact:
Post
by Driber » Thu Sep 25, 2008 3:41 am
Code: Select all
putloglev p "#mychan" "<mybot> hello"
thanks, nml375, that works perfect