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

	<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>2013-04-02T11:43:07-04:00</updated>

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

		<entry>
		<author><name><![CDATA[BigToe]]></name></author>
		<updated>2013-04-02T11:43:07-04:00</updated>

		<published>2013-04-02T11:43:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101355#p101355</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101355#p101355"/>
		<title type="html"><![CDATA[Matching Text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101355#p101355"><![CDATA[
Thank you, speechles!<br><br>This works great, really impressive!<br><br>Thank you for helping out: Madalin, Spike^^, speechles<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11473">BigToe</a> — Tue Apr 02, 2013 11:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2013-04-02T00:48:24-04:00</updated>

		<published>2013-04-02T00:48:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101351#p101351</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101351#p101351"/>
		<title type="html"><![CDATA[Matching Text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101351#p101351"><![CDATA[
The problem is both \0034 and \00304 both lead to <span style="color:red">red</span>. So you need to anticipate both to accurately handle this. The script I wrote below is modified from SpiKe^^'s above. So of course this is a collaboration. <br><br>I want to relay from #chanA to #chanB for example, in the scripts config I would set the relaychan to #chanB. I would .chanset #chanA +bigtoetrack on partyline.<br><blockquote class="uncited"><div>** in #chanA **<br>&lt;speechles&gt; hi there &lt;control-k&gt;4this is red &lt;control-k&gt;this isnt &lt;control-k&gt;04but this is red again&lt;control-k&gt; then it isnt<br>** which appears in #chanA **<br>&lt;speechles&gt; hi there <span style="color:red">this is red </span>this isnt <span style="color:red">but this is red again</span> then it isnt<br><br>** moments later in #chanB **<br>&lt;bot&gt; Found results: this is red, but this is red again.</div></blockquote>Hopefully this is what you had in mind. Enjoys <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><div class="codebox"><p>Code: </p><pre><code># BigToe Tracker v0.1# Captures all text with a certain color, in channels you want and# relays this to a control channel where you can see it appearnamespace eval big_toe {   variable track   # --&gt; config starts   # what color are we tracking? for colors 0 thru 9 you need to use both   # 0-9 and 00-09. for example red is [list "4" "04"]. the number with the   # leading zero must be last. for colors 10 and onward there is no issue   # like this so you would use a single number for example, pink would   # be [list "13"]   set track(color) [list "4" "04"]   # Which channel are we relay the tracked messages to?   set track(relaychan) #relaychannel   # &lt;-- config ends}bind pubm - * big_toe::tracksetudef flag bigtoetracknamespace eval big_toe {   proc track {nick uhost hand chan text} {      if {![channel get $chan bigtoetrack]} { return 1 }      variable track      set stext [split $text \003]      set matches [lsearch -glob -all -inline $stext [lindex $track(color) 0]*]      if {[llength $track(color)] &gt; 1} {         set morematches [lsearch -glob -all -inline $stext [lindex $track(color) 1]*]         set iterate [list matches 1 morematches 2]      } else {         set iterate [list matches 1]      }      foreach {n v} $iterate {         foreach r [set $n] {            lappend result [string range [string trim $r] $v end]         }      }      if {[info exists result]} {         putserv "privmsg $track(relaychan) :Found results: [join $result ", "]."      }      return 1   }}putlog "*** BigToeTracker v0.1 Loaded."#eof</code></pre></div>Edit: Conversely, if you get this far.. Here is another way to do it. This one is more straight forward, no config, this should do exactly what you desire...<div class="codebox"><p>Code: </p><pre><code>bind pubm - "#froglegs *" big_toe::tracknamespace eval big_toe {   proc track {nick uhost hand chan text} {      set text [split $text \003]      foreach sentence $text {         if {[string match 4* $sentence]} {            set addme [string range $sentence 1 end]         } elseif {[string match 04* $sentence]} {             set addme [string range $sentence 2 end]         }         if {[info exists addme]} {            lappend result [string trim $addme]            unset addme         }      }      if {[info exists result]} {         putserv "privmsg #goahead :#Froglegs: &lt;$nick&gt; [join $result " "]"      }   }}</code></pre></div><blockquote class="uncited"><div>*** in #Frogslegs ***<br>&lt;speechles&gt; blsh nlssdfhi there <span style="color:red">this is red again</span> this isnt <span style="color:red">but this is red and</span><span style="color:cyan">now its cyan </span><span style="color:red">then its red again :<strong class="text-strong"></strong>D</span><br><br>*** moments later in #goahead ***<br>&lt;bot&gt; #Froglegs: &lt;speechles&gt; this is red again but this is red and then its red again :<strong class="text-strong"></strong>D</div></blockquote>The first way, gives priority to 4* appearing first in the result list. This may be a problem if the red text isn't given back in the order it was in the text. If this is a problem, the second way alleviates this issue and is a more simple approach to the exact same idea. Hopefully combined you gain a better grasp of tcl by exposing you to several ways to accomplish this.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Tue Apr 02, 2013 12:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2013-04-01T13:02:36-04:00</updated>

		<published>2013-04-01T13:02:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101343#p101343</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101343#p101343"/>
		<title type="html"><![CDATA[Matching Text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101343#p101343"><![CDATA[
Maybe something more like this...<div class="codebox"><p>Code: </p><pre><code>bind PUBM - "#from *" bigtoe:pubm set bigtoetx(chan) "#to" proc bigtoe:pubm {nick uhost hand chan arg} {    if {[string match "*\0034*" $arg]} {       set start [expr {[string first "\0034" $arg]+2}]      set x [string first "\003" $arg $start]      if {$x&gt;"-1"} {  set end [incr x -1]  } else {  set end "end"  }      set arg [string range $arg $start $end]       putserv "PRIVMSG $::bigtoetx(chan) :Found $arg on chan $chan"    } } </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Mon Apr 01, 2013 1:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BigToe]]></name></author>
		<updated>2013-04-01T12:50:35-04:00</updated>

		<published>2013-04-01T12:50:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101342#p101342</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101342#p101342"/>
		<title type="html"><![CDATA[Matching Text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101342#p101342"><![CDATA[
hi<br><br>That does not return the whole text in red, just the first word<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11473">BigToe</a> — Mon Apr 01, 2013 12:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Madalin]]></name></author>
		<updated>2013-04-01T12:25:28-04:00</updated>

		<published>2013-04-01T12:25:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101341#p101341</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101341#p101341"/>
		<title type="html"><![CDATA[Matching Text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101341#p101341"><![CDATA[
Try this <br><div class="codebox"><p>Code: </p><pre><code>bind PUBM - "#from *" bigtoe:pubmset bigtoetx(chan) "#to"proc bigtoe:pubm {nick uhost hand chan arg} {foreach a $arg {if {[string match "*\0034*" $a]} {set a [string map [list "\0034" ""] $a]putserv "PRIVMSG $::bigtoetx(chan) :Found $a on chan $chan"}}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6396">Madalin</a> — Mon Apr 01, 2013 12:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BigToe]]></name></author>
		<updated>2013-04-01T12:21:14-04:00</updated>

		<published>2013-04-01T12:21:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101340#p101340</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101340#p101340"/>
		<title type="html"><![CDATA[Matching Text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101340#p101340"><![CDATA[
Hey,<br><br>thank you for ur work Madalin and Spike<br><br>this works Spike^^ but it does not display just the text in red - it displays the whole sentence..<br><br><br>I wrote earlier..<br><blockquote class="uncited"><div>I need a script that when someone writes a text on channel #Froglegs and all of it or part of it is colored in red - it will return only the part of the string that is colored</div></blockquote>[/code]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11473">BigToe</a> — Mon Apr 01, 2013 12:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2013-04-01T11:53:27-04:00</updated>

		<published>2013-04-01T11:53:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101339#p101339</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101339#p101339"/>
		<title type="html"><![CDATA[Matching Text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101339#p101339"><![CDATA[
Some other script is using the var name 'temp' as a scalar variable name.<br>Try changing the array name to something less generic...<div class="codebox"><p>Code: </p><pre><code>bind PUBM - "#from *" bigtoe:pubm set bigtoetx(chan) "#to" proc bigtoe:pubm {nick uhost hand chan arg} {    if {[string match "*\0034*" $arg]} {       set arg [string map [list "\0034" ""] $arg]       putserv "PRIVMSG $::bigtoetx(chan) :Found $arg on chan $chan"    } } </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Mon Apr 01, 2013 11:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BigToe]]></name></author>
		<updated>2013-04-01T08:00:31-04:00</updated>

		<published>2013-04-01T08:00:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101335#p101335</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101335#p101335"/>
		<title type="html"><![CDATA[Matching Text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101335#p101335"><![CDATA[
I have and it still does not work..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11473">BigToe</a> — Mon Apr 01, 2013 8:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Madalin]]></name></author>
		<updated>2013-04-01T07:50:35-04:00</updated>

		<published>2013-04-01T07:50:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101334#p101334</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101334#p101334"/>
		<title type="html"><![CDATA[Matching Text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101334#p101334"><![CDATA[
I have tested that version that is currently posted and works as it should i really don`t know why it doesnt work at you. Try copy paste the script and restart the eggdrop<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6396">Madalin</a> — Mon Apr 01, 2013 7:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BigToe]]></name></author>
		<updated>2013-04-01T07:46:38-04:00</updated>

		<published>2013-04-01T07:46:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101333#p101333</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101333#p101333"/>
		<title type="html"><![CDATA[Matching Text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101333#p101333"><![CDATA[
Same error..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11473">BigToe</a> — Mon Apr 01, 2013 7:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Madalin]]></name></author>
		<updated>2013-04-01T06:13:57-04:00</updated>

		<published>2013-04-01T06:13:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101332#p101332</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101332#p101332"/>
		<title type="html"><![CDATA[Matching Text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101332#p101332"><![CDATA[
Edited the post try again<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6396">Madalin</a> — Mon Apr 01, 2013 6:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BigToe]]></name></author>
		<updated>2013-04-01T02:27:26-04:00</updated>

		<published>2013-04-01T02:27:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101329#p101329</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101329#p101329"/>
		<title type="html"><![CDATA[Matching Text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101329#p101329"><![CDATA[
<blockquote class="uncited"><div>can't set "temp(chan)": variable isn't array<br>    while executing<br>"set temp(chan) "#to" "<br>    (file "scripts/redtext.tcl" line 3)<br></div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11473">BigToe</a> — Mon Apr 01, 2013 2:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Madalin]]></name></author>
		<updated>2013-04-01T07:49:53-04:00</updated>

		<published>2013-03-31T12:15:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101318#p101318</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101318#p101318"/>
		<title type="html"><![CDATA[Matching Text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101318#p101318"><![CDATA[
Try this<br><div class="codebox"><p>Code: </p><pre><code>bind PUBM - "#from *" bigtoe:pubmset temp(chan) "#to"proc bigtoe:pubm {nick uhost hand chan arg} {if {[string match "*\0034*" $arg]} {set arg [string map [list "\0034" ""] $arg]putserv "PRIVMSG $::temp(chan) :Found $arg on chan $chan"}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6396">Madalin</a> — Sun Mar 31, 2013 12:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BigToe]]></name></author>
		<updated>2013-03-31T11:36:41-04:00</updated>

		<published>2013-03-31T11:36:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101315#p101315</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101315#p101315"/>
		<title type="html"><![CDATA[Matching Text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101315#p101315"><![CDATA[
Hey, need your help <br><br>I need a script that when someone writes a text on channel #Froglegs and all of it or part of it is colored in red - it will return only the part of the string that is colored and red and will strip it from codes (so it won't return red, it will return just as a regular non-colored text) and will message that matching red text to #goahead<br><br>help please?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11473">BigToe</a> — Sun Mar 31, 2013 11:36 am</p><hr />
]]></content>
	</entry>
	</feed>
