<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/12525" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2006-10-12T07:00:38-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/12525</id>

		<entry>
		<author><name><![CDATA[Aariancya]]></name></author>
		<updated>2006-10-12T07:00:38-04:00</updated>

		<published>2006-10-12T07:00:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67098#p67098</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67098#p67098"/>
		<title type="html"><![CDATA[bot logging]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67098#p67098"><![CDATA[
Yes, now it logs in the right order, thanks  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8280">Aariancya</a> — Thu Oct 12, 2006 7:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2006-10-12T06:38:05-04:00</updated>

		<published>2006-10-12T06:38:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67096#p67096</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67096#p67096"/>
		<title type="html"><![CDATA[bot logging]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67096#p67096"><![CDATA[
<blockquote class="uncited"><div>Now the command is logged first, but the multiple lines said by the bot are reversed</div></blockquote>Try this one: <div class="codebox"><p>Code: </p><pre><code>set outlog(#fegefeuer) "#fegefeuer"if {![llength [info procs puthelp]]} {rename puthelp __puthelp rename putserv __putserv rename putquick __putquick}proc puthelp args {global __logeval __puthelp $argslappend __log [lindex $args 0]if {[llength __log]==1} {utimer 0 __log}}proc putserv args {global __logeval __putserv $argslappend __log [lindex $args 0]if {[llength __log]==1} {utimer 0 __log}} proc putquick args {global __logeval __putquick $argslappend __log [lindex $args 0]if {[llength __log]==1} {utimer 0 __log}}proc __log {} {global outlog __log botnickforeach s $__log {if {[scan $s "PRIVMSG %s %\[^\n\]" c a]&amp;&amp;[info exists outlog([set c [string tolower $c]])]} {if {[string index $a 0]==":"} {set a [string range $a 1 end]}if {[string match \001*\001 $a]} {set a [string range $a 1 end-1]if {[string match "ACTION *" $a]} {putloglev p $outlog($c) "Action: $botnick [string range $a 7 end]"} else {putloglev p $outlog($c) "\[$botnick $a\]"}} else {putloglev p $outlog($c) "&lt;$botnick&gt; $a"}}}set __log {}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Thu Oct 12, 2006 6:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Aariancya]]></name></author>
		<updated>2006-10-12T03:58:43-04:00</updated>

		<published>2006-10-12T03:58:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67095#p67095</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67095#p67095"/>
		<title type="html"><![CDATA[bot logging]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67095#p67095"><![CDATA[
Now the command is logged first, but the multiple lines said by the bot are reversed<br><blockquote class="uncited"><div>[09:56] &lt;User&gt; command<br>[09:56] &lt;Bot&gt; line 7<br>[09:56] &lt;Bot&gt; line 6<br>[09:56] &lt;Bot&gt; line 5<br>[09:56] &lt;Bot&gt; line 4<br>[09:56] &lt;Bot&gt; line 3<br>[09:56] Action: Bot line 2<br>[09:56] &lt;Bot&gt; line 1</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8280">Aariancya</a> — Thu Oct 12, 2006 3:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2006-10-11T19:10:35-04:00</updated>

		<published>2006-10-11T19:10:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67089#p67089</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67089#p67089"/>
		<title type="html"><![CDATA[bot logging]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67089#p67089"><![CDATA[
<blockquote class="uncited"><div>I just saw it: the order of the messages and commands is reversed</div></blockquote>Try the edited version...i added some timers which should make the logging happen after the triggered procs return. (And fixed a bug (allowing options with the put* commands))<br>PS: Make sure you try it with a script that outputs multiple lines from the same proc (i'm not sure the timers are executed in the right order)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Oct 11, 2006 7:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Aariancya]]></name></author>
		<updated>2006-10-10T15:27:55-04:00</updated>

		<published>2006-10-10T15:27:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67076#p67076</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67076#p67076"/>
		<title type="html"><![CDATA[bot logging]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67076#p67076"><![CDATA[
Thank you very much, that works!<br><br>Edit:<br>I just saw it: the order of the messages and commands is reversed:<br><blockquote class="uncited"><div>&lt;Bot&gt; reaction to the command<br>&lt;Name&gt; the message with the command</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8280">Aariancya</a> — Tue Oct 10, 2006 3:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2006-10-10T14:53:25-04:00</updated>

		<published>2006-10-10T14:53:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67075#p67075</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67075#p67075"/>
		<title type="html"><![CDATA[bot logging]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67075#p67075"><![CDATA[
<blockquote class="uncited"><div>One more question: Is it possible to log the actions like<br><br><strong class="text-strong">Action: Geistereule does something.</strong><br><br>Instead of:<br><br><strong class="text-strong">&lt;Geistereule&gt; ACTION does something.</strong></div></blockquote>Short answer: yes.<br>Long answer:<div class="codebox"><p>Code: </p><pre><code>proc __log s { global outlog if {[scan $s "PRIVMSG %s %\[^\n\]" c a]&amp;&amp;[info exists outlog([set c [string tolower $c]])]} { if {[string index $a 0]==":"} {set a [string range $a 1 end]} if {[string match \001*\001 $a]} {# ctcpset a [string range $a 1 end-1]if {[string match "ACTION *" $a]} {# ctcp actionputloglev p $outlog($c) "Action: $::botnick [string range $a 7 end]"} else {# other ctcp (you'll probably want to change this)putloglev p $outlog($c) "\[$::botnick $a\]"}} else {# plain privmsgputloglev p $outlog($c) "&lt;$::botnick&gt; $a" }} }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue Oct 10, 2006 2:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Aariancya]]></name></author>
		<updated>2006-10-10T13:11:40-04:00</updated>

		<published>2006-10-10T13:11:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67070#p67070</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67070#p67070"/>
		<title type="html"><![CDATA[bot logging]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67070#p67070"><![CDATA[
That works, thanks a lot!<br><br>One more question: Is it possible to log the actions like<br><br><strong class="text-strong">Action: Geistereule does something.</strong><br><br>Instead of:<br><br><strong class="text-strong">&lt;Geistereule&gt; ACTION does something.</strong><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8280">Aariancya</a> — Tue Oct 10, 2006 1:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2006-10-10T12:50:49-04:00</updated>

		<published>2006-10-10T12:50:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67069#p67069</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67069#p67069"/>
		<title type="html"><![CDATA[bot logging]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67069#p67069"><![CDATA[
I forgot that scan rules are not evaluated <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> Try the edited version <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue Oct 10, 2006 12:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Aariancya]]></name></author>
		<updated>2006-10-10T12:12:16-04:00</updated>

		<published>2006-10-10T12:12:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67065#p67065</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67065#p67065"/>
		<title type="html"><![CDATA[bot logging]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67065#p67065"><![CDATA[
I've tried the code for overwriting the put* commands and it does log something - but it kinda cuts the end off.<br><br>An example: the bot says to the channel:<br><br>&lt;Geistereule&gt; Willkommen, Niniane!<br><br>In the logfile is written only:<br><br>&lt;Geistereule&gt; Willkomme<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8280">Aariancya</a> — Tue Oct 10, 2006 12:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2006-10-11T19:14:43-04:00</updated>

		<published>2006-10-10T11:02:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67059#p67059</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67059#p67059"/>
		<title type="html"><![CDATA[bot logging]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67059#p67059"><![CDATA[
<blockquote class="uncited"><div>it can be done but means changing bits of the tcl script</div></blockquote>...or you could override the put* commands, to avoid having to alter every script you load, using something like this (not tested and not including putdccraw):<div class="codebox"><p>Code: </p><pre><code># log messages sent to #yourchan to the #yourchan logset outlog(#yourchan) "#yourchan"# rename the put* commands only once...if {![llength [info procs puthelp]]} {rename puthelp __puthelprename putserv __putservrename putquick __putquickproc puthelp args {eval __puthelp $argsutimer 0 [list __log [lindex $args 0]]}proc putserv args {eval __putserv $argsutimer 0 [list __log [lindex $args 0]]}proc putquick args {eval __putquick $argsutimer 0 [list __log [lindex $args 0]]}proc __log s {global outlogif {[scan $s "PRIVMSG %s %\[^\n\]" c a]&amp;&amp;[info exists outlog([set c [string tolower $c]])]} {if {[string index $a 0]==":"} {set a [string range $a 1 end]}### Change this to suit your needs:putloglev p $outlog($c) "&lt;$::botnick&gt; $a"}}}</code></pre></div>...but you'll only capture the output generated by scripts, not messages sent via dcc commands like .say or .dump - to do that you'd need to hack the eggdrop source (or rewrite all commands that have the ability to send messages - patching the source would be better IMO)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue Oct 10, 2006 11:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[deadite66]]></name></author>
		<updated>2006-10-10T10:14:11-04:00</updated>

		<published>2006-10-10T10:14:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67057#p67057</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67057#p67057"/>
		<title type="html"><![CDATA[bot logging]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67057#p67057"><![CDATA[
it can be done but means changing bits of the tcl script<br><br>in eggdrop conf<div class="codebox"><p>Code: </p><pre><code>logfile jkp1 #channel "/eggdrop/logs/channel.log"</code></pre></div>and in each tcl script where the puthelp etc are<div class="codebox"><p>Code: </p><pre><code>global botnickputloglev 1 #channel "&lt;$botnick&gt; text to add to log file."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6296">deadite66</a> — Tue Oct 10, 2006 10:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Aariancya]]></name></author>
		<updated>2006-10-10T04:14:40-04:00</updated>

		<published>2006-10-10T04:14:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67050#p67050</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67050#p67050"/>
		<title type="html"><![CDATA[bot logging]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67050#p67050"><![CDATA[
But if I use 'v' I'll get ALL of the messages the bot sent to ALL channels..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8280">Aariancya</a> — Tue Oct 10, 2006 4:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2006-10-11T01:08:33-04:00</updated>

		<published>2006-10-10T03:39:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67048#p67048</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67048#p67048"/>
		<title type="html"><![CDATA[bot logging]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67048#p67048"><![CDATA[
<span style="color:darkred">Edited</span>: Totally misread that; scripting at the same time is not a good idea (apparently).  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Tue Oct 10, 2006 3:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Aariancya]]></name></author>
		<updated>2006-10-10T01:52:00-04:00</updated>

		<published>2006-10-10T01:52:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67044#p67044</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67044#p67044"/>
		<title type="html"><![CDATA[bot logging]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67044#p67044"><![CDATA[
Is it possible to log what the bot wrote in the channel too? Because it doesn't do that and I would like to have what's said by the bot to the channel in the log file.<br><br>The setting in my eggbot.conf is:<br>logfile jpk #fegefeuer "logs/fege/fegefeuer.log"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8280">Aariancya</a> — Tue Oct 10, 2006 1:52 am</p><hr />
]]></content>
	</entry>
	</feed>
