<?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/11331" />

	<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-02-08T20:50:07-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-02-08T20:50:07-04:00</updated>

		<published>2006-02-08T20:50:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60242#p60242</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60242#p60242"/>
		<title type="html"><![CDATA[Tracking Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60242#p60242"><![CDATA[
<blockquote class="uncited"><div>Ok rehashing doesn't work lol but restarting the bot does. So that will do for now. Thanks for all of your help, I appreciate it bunches.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"></div></blockquote>Rehashing does work since loglist will be reset to the contents of the file (which you edited).<br><div class="codebox"><p>Code: </p><pre><code>if {[file exists scripts/trackingscript.log]} { set loglist [split [read [set file [open scripts/trackingscript.log]]][close $file] \n]}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Wed Feb 08, 2006 8:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[furious]]></name></author>
		<updated>2006-02-08T19:44:42-04:00</updated>

		<published>2006-02-08T19:44:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60241#p60241</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60241#p60241"/>
		<title type="html"><![CDATA[Tracking Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60241#p60241"><![CDATA[
Ok rehashing doesn't work lol but restarting the bot does. So that will do for now. Thanks for all of your help, I appreciate it bunches.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7248">furious</a> — Wed Feb 08, 2006 7:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-02-08T18:41:20-04:00</updated>

		<published>2006-02-08T18:41:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60239#p60239</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60239#p60239"/>
		<title type="html"><![CDATA[Tracking Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60239#p60239"><![CDATA[
After you delete the log, .rehash or .tcl source scripts/thisscript.tcl.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Wed Feb 08, 2006 6:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[furious]]></name></author>
		<updated>2006-02-08T17:13:00-04:00</updated>

		<published>2006-02-08T17:13:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60235#p60235</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60235#p60235"/>
		<title type="html"><![CDATA[Tracking Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60235#p60235"><![CDATA[
Ackkkkkkkkkkk now I have another problem, whenever I delete the logs that the script creates they diappear they are gone completely, but the next time the script updates the logs, it replaces everything that was deleted as well!!  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_eek.gif" width="15" height="15" alt=":shock:" title="Shocked">  Any ideas on how to fix that?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7248">furious</a> — Wed Feb 08, 2006 5:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-02-08T14:16:45-04:00</updated>

		<published>2006-02-08T14:16:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60232#p60232</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60232#p60232"/>
		<title type="html"><![CDATA[Tracking Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60232#p60232"><![CDATA[
you can add<div class="codebox"><p>Code: </p><pre><code>if {[string match -nocase "*trigger*" $arg]} { #myputlog...}</code></pre></div>btw, change <strong class="text-strong">args</strong> to <strong class="text-strong">arg</strong>, <strong class="text-strong">args</strong> has a special meaning in tcl.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Wed Feb 08, 2006 2:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[furious]]></name></author>
		<updated>2006-02-08T11:48:36-04:00</updated>

		<published>2006-02-08T11:48:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60227#p60227</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60227#p60227"/>
		<title type="html"><![CDATA[Tracking Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60227#p60227"><![CDATA[
I would only want it to track instances of the word "trigger" being said.  This is just a first draft of this script, once I get this better and finished touching it up, I'll start working on the next version that will be much easier to read and stuff.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7248">furious</a> — Wed Feb 08, 2006 11:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-02-08T10:50:13-04:00</updated>

		<published>2006-02-08T10:50:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60226#p60226</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60226#p60226"/>
		<title type="html"><![CDATA[Tracking Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60226#p60226"><![CDATA[
What word?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Wed Feb 08, 2006 10:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[furious]]></name></author>
		<updated>2006-02-08T10:20:08-04:00</updated>

		<published>2006-02-08T10:20:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60225#p60225</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60225#p60225"/>
		<title type="html"><![CDATA[Tracking Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60225#p60225"><![CDATA[
Thanks Sir_Fz it works fine.  As a tweak to it, is there any way to make the script log just the word that matches the specified word instead of the whole sentence?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7248">furious</a> — Wed Feb 08, 2006 10:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-02-08T09:15:21-04:00</updated>

		<published>2006-02-08T09:15:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60224#p60224</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60224#p60224"/>
		<title type="html"><![CDATA[Tracking Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60224#p60224"><![CDATA[
Where did you get that "close $file" from? just add the code I gave you into your script, and change [putlog] to [myputlog].<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Wed Feb 08, 2006 9:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[furious]]></name></author>
		<updated>2006-02-07T23:28:40-04:00</updated>

		<published>2006-02-07T23:28:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60212#p60212</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60212#p60212"/>
		<title type="html"><![CDATA[Tracking Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60212#p60212"><![CDATA[
Ok have made a few changes and followed the advice given.  Now this is my script.<br><div class="codebox"><p>Code: </p><pre><code># Set the next line as the file to log to set filter_words "/home/user/eggdrop/logs/stats.log" ### Set Words that you want the Bot to Log on set words { "test" } ## Binding all Public Messages to our Process bind pubm - * filter_words proc ccodes:filter {str} { regsub -all -- {\003([0-9]{1,2}(,[0-9]{1,2})?)?|\017|\037|\002|\026|\006|\007} $str "" str return $str } ## Starting Process proc filter_words {nick uhost handle channel args} { global words botnick set args [ccodes:filter $args] foreach word [string tolower $words] { if {[string match *$word* [string tolower $args]]} { if {[matchattr $handle $channel]} { myputlog "4\[[strftime "%D %T"]\] $nick said $args on $channel"  } close $file } } } if {[file exists scripts/stats.log]} {  set loglist [split [read [set file [open scripts/stats.log]]][close $file] \n] } bind time - ?0* save:log proc save:log args {  set f [open scripts/stats.log w]  foreach l $::loglist {   if {$l != ""} {    puts $f $l   }  }  close $f } proc myputlog arg {  if {$arg != ""} {   lappend ::loglist $arg  } }bind pubm - * filter_words putlog " 4f13µ12®8î9ö6µ7§ 8 Tracking Script Loaded" </code></pre></div>However that script is now giving me this error message:<br><br> Tcl error [filter_words]: can't read "file": no such variable<br><br>So aside from this new error its also not logging again.  I got the date and time added that I wanted to have, now just a few more small bugs to work out and I'm done.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7248">furious</a> — Tue Feb 07, 2006 11:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-02-07T19:49:13-04:00</updated>

		<published>2006-02-07T19:49:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60210#p60210</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60210#p60210"/>
		<title type="html"><![CDATA[Tracking Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60210#p60210"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>if {[file exists scripts/trackingscript.log]} { set loglist [split [read [set file [open scripts/trackingscript.log]]][close $file] \n]}bind time - ?0* save:logproc save:log args { set f [open scripts/trackingscript.log w] foreach l $::loglist {  if {$l != ""} {   puts $f $l  } } close $f}proc myputlog arg { if {$arg != ""} {  lappend ::loglist $arg }}</code></pre></div>so now, instead of [putlog] use [myputlog] and everything will be logged into trackingscript.log in the script/ directory. (The file is updated every 10 minutes)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Tue Feb 07, 2006 7:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[furious]]></name></author>
		<updated>2006-02-07T15:20:02-04:00</updated>

		<published>2006-02-07T15:20:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60200#p60200</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60200#p60200"/>
		<title type="html"><![CDATA[Tracking Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60200#p60200"><![CDATA[
Ok its logging now, but how can I specify what file to put it in? Because right now it is going into the bots normal log file which isn't what I want, thats a lot of lines to look through.  I want this to go to a specific file and a specific place.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7248">furious</a> — Tue Feb 07, 2006 3:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[furious]]></name></author>
		<updated>2006-02-06T23:20:17-04:00</updated>

		<published>2006-02-06T23:20:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60184#p60184</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60184#p60184"/>
		<title type="html"><![CDATA[Tracking Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60184#p60184"><![CDATA[
Ok since it's still not logging I have even tried to specify a path for it to send the logs to.  So now this is what my script looks like.<div class="codebox"><p>Code: </p><pre><code># Set the next line as the file to log toset filter_words "/home/user/eggdrop/logs/serverstats.log"### Set Words that you want the Bot to Log onset words { "sample"}## Binding all Public Messages to our Processbind pubm - * filter_wordsproc ccodes:filter {str} {  regsub -all -- {\003([0-9]{1,2}(,[0-9]{1,2})?)?|\017|\037|\002|\026|\006|\007} $str "" str  return $str}## Starting Processproc filter_words {nick uhost handle channel args} { global words botnick set args [ccodes:filter $args]   set handle [nick2hand $nick]foreach word [string tolower $words] {     if {[string match *$word* [string tolower $args]]}  {       if {[matchattr $handle flags $channel]} {           putlog "-4Tracking Script -ATTENTION-0 $nick ($handle) said $args on $channel"             } else {           putlog "-4Tracking Script -ATTENTION0 $nick on $channel matched by $args"       }    }  }}bind pubm - * filter_wordsputlog "FuRiOuS Tracking Script Loaded"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7248">furious</a> — Mon Feb 06, 2006 11:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-02-06T21:54:37-04:00</updated>

		<published>2006-02-06T21:54:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60181#p60181</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60181#p60181"/>
		<title type="html"><![CDATA[Tracking Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60181#p60181"><![CDATA[
Since you used [putlog], you can see them in the eggdrop's logfile.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Mon Feb 06, 2006 9:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[furious]]></name></author>
		<updated>2006-02-06T21:13:16-04:00</updated>

		<published>2006-02-06T21:13:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60180#p60180</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60180#p60180"/>
		<title type="html"><![CDATA[Tracking Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60180#p60180"><![CDATA[
Ok yeah duh that was my bad after removing that one line that takes care of my error message, but it's still not logging the word being said.  It does catch the phrase though, because it shows it in the party line, but I want to retrieve this information later on, if somebody could help that would be great, or point me in the direction of a very dummified beginers manual would be great.  This is my first attempt at writing something myself, so I have taken bits and pieces of it from other scripts so far,  making progress but still a ways to go.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7248">furious</a> — Mon Feb 06, 2006 9:13 pm</p><hr />
]]></content>
	</entry>
	</feed>
