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

	<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>2004-11-25T09:20:16-04:00</updated>

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

		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-11-25T09:20:16-04:00</updated>

		<published>2004-11-25T09:20:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43101#p43101</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43101#p43101"/>
		<title type="html"><![CDATA[chanrelay.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43101#p43101"><![CDATA[
It works just fine for me. What did you try (paste some code) and what strings did you feed it and what error messages/unexpected results did you get?<br><br>My test (in tclsh):<div class="codebox"><p>Code: </p><pre><code>foreach a {{(extract_data1)-››-[extract_data2]-››-(Extract_data3)}{(extract_data1)-››-[extract_data2]}{bla bla bla}} {if {[regexp {^\((.+?)\)-..-\[(.+?)\](?:-..-\((.+?)\))?$} $a a data1 data2 data3]} {if {$data3!=""} {puts "match 3: $data1 | $data2 | $data3"} else {puts "match 2: $data1 | $data2"}} else {puts "mismatch: $a"}}</code></pre></div>Results in:<blockquote class="uncited"><div>match 3: extract_data1 | extract_data2 | Extract_data3<br>match 2: extract_data1 | extract_data2<br>mismatch: bla bla bla</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Thu Nov 25, 2004 9:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TurboChicken]]></name></author>
		<updated>2004-11-24T17:49:29-04:00</updated>

		<published>2004-11-24T17:49:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43093#p43093</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43093#p43093"/>
		<title type="html"><![CDATA[chanrelay.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43093#p43093"><![CDATA[
nope i tried a few different variations of that regexp... still not working... and i've come across an error.... where by if the in the first data there is a - then it pulls it out from there???<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5488">TurboChicken</a> — Wed Nov 24, 2004 5:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TurboChicken]]></name></author>
		<updated>2004-11-23T12:32:52-04:00</updated>

		<published>2004-11-23T12:32:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43036#p43036</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43036#p43036"/>
		<title type="html"><![CDATA[chanrelay.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43036#p43036"><![CDATA[
nope it didn't like that<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5488">TurboChicken</a> — Tue Nov 23, 2004 12:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-11-23T01:33:50-04:00</updated>

		<published>2004-11-23T01:33:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43022#p43022</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43022#p43022"/>
		<title type="html"><![CDATA[chanrelay.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43022#p43022"><![CDATA[
<blockquote class="uncited"><div>it now works... but it didn't remove the () and the [] was that purpose full or is it abit more difficult to remove them???</div></blockquote>It's not difficult at all...in fact it makes things easier as you can ignore those pesky arrow thingies <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> I didn't think they were part of the string you were parsing (()&amp;[])<br>Make the bind mask "#chan1 *)*]*" and change the regexp to <div class="codebox"><p>Code: </p><pre><code>[regexp {^\((.+?)\)-..-\[(.+?)\](?:-..-\((.+?)\))?$} $a a data1 data2 data3]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue Nov 23, 2004 1:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TurboChicken]]></name></author>
		<updated>2004-11-23T00:04:19-04:00</updated>

		<published>2004-11-23T00:04:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43021#p43021</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43021#p43021"/>
		<title type="html"><![CDATA[chanrelay.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43021#p43021"><![CDATA[
it now works... but it didn't remove the () and the [] was that purpose full or is it abit more difficult to remove them???<br><br>coz really that's what i want<br><br>but other than that it works perfect......<br><br>now all that left is to get it all into a mysql database and then setup searching through it... and well you get the drift... that's y i'm learning to use it... and no i don't want anyone to gimme a script to do it. unless there is a prebuilt one.... i wanna create something that is new...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5488">TurboChicken</a> — Tue Nov 23, 2004 12:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TurboChicken]]></name></author>
		<updated>2004-11-22T23:19:09-04:00</updated>

		<published>2004-11-22T23:19:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43020#p43020</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43020#p43020"/>
		<title type="html"><![CDATA[chanrelay.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43020#p43020"><![CDATA[
now it's not working at all... nothing nada... i've reverted back to the orginal one and nothing...<br><br>&lt;EDIT&gt; didn't know i had to re +R original is working... going to try the new ones<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5488">TurboChicken</a> — Mon Nov 22, 2004 11:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-11-22T23:07:59-04:00</updated>

		<published>2004-11-22T23:07:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43019#p43019</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43019#p43019"/>
		<title type="html"><![CDATA[hmm]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43019#p43019"><![CDATA[
<blockquote class="uncited"><div>not working... no errors and i have changed bot nick and channels... and i restarted and rehashed the bot... i also tried removing the *&gt;* part so see coz i thought i might be stopping it coz the &gt; part is emboldened</div></blockquote>Might be an encoding problem...use the old bind (without the ›) and replace the ›'s in the regexp with \x9B - if that fails, try \u203A ...if that fails, replace them with dots (.)<br>Oh and btw: "&gt;" is not the same char as "›" even if they look similar.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Mon Nov 22, 2004 11:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TurboChicken]]></name></author>
		<updated>2004-11-22T22:11:34-04:00</updated>

		<published>2004-11-22T22:11:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43018#p43018</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43018#p43018"/>
		<title type="html"><![CDATA[chanrelay.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43018#p43018"><![CDATA[
not working... no errors and i have changed bot nick and channels... and i restarted and rehashed the bot... i also tried removing the *&gt;* part so see coz i thought i might be stopping it coz the &gt; part is emboldened<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5488">TurboChicken</a> — Mon Nov 22, 2004 10:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-11-22T21:56:33-04:00</updated>

		<published>2004-11-22T21:56:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43017#p43017</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43017#p43017"/>
		<title type="html"><![CDATA[chanrelay.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43017#p43017"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># in bot1 (the one listening for messages):bind pubm R "#chan1 *›*" pub:relayproc pub:relay {n u h c a} {regsub -all {\002|\026|\017|\037|\003(\d{1,2}(,\d{1,2})?)?} $a "" aif {[regexp {^(.+?)-››-(.+?)(?:-››-(.+?))?$} $a a data1 data2 data3]} {if {$data3!={}} {putbot bot2 "rmsg 3: $data1 | $data2 | $data3"} else {putbot bot2 "rmsg 2: $data1 | $data2"}}}</code></pre></div>Notice the "›" added to the bind to weed out most unwanted messages. (the regexp will weed out the rest)<br>Remember to get rid of the old bind by restarting/unbinding and to change the channel name and botnick <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> — Mon Nov 22, 2004 9:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TurboChicken]]></name></author>
		<updated>2004-11-22T21:30:34-04:00</updated>

		<published>2004-11-22T21:30:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43016#p43016</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43016#p43016"/>
		<title type="html"><![CDATA[chanrelay.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43016#p43016"><![CDATA[
(extract_data1)-››-[extract_data2]-››-(Extract_data3) <br><br>() &amp; [] are not included in any of the extract datas and the whole line has some colour formatting so that would need to be removed first i would think (if doesn't NEED to be removed i would like it to be if possible)... and extract_data3 doesn't always exist so some times it would say:<br><br>(extract_data1)-››-[extract_data2]<br><br>and sometimes there may be some normal chat from the user... so i don't want it to pick up that stuff<br><br>as for formatting if those can be extracting into variable i can do the rest i'm pretty sure.<br><br>i can do some TCL but i'm just learning.<br><br>so if you could tell me a good resource to learn from i could probably do it myself<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5488">TurboChicken</a> — Mon Nov 22, 2004 9:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-11-22T21:15:01-04:00</updated>

		<published>2004-11-22T21:15:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43015#p43015</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43015#p43015"/>
		<title type="html"><![CDATA[chanrelay.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43015#p43015"><![CDATA[
<blockquote class="uncited"><div>all i need now is for someone to create the parsing and formatting side of it</div></blockquote>Telling us what you want to parse and the desired output format would speed up that process  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Mon Nov 22, 2004 9:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TurboChicken]]></name></author>
		<updated>2004-11-22T20:45:25-04:00</updated>

		<published>2004-11-22T20:45:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43014#p43014</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43014#p43014"/>
		<title type="html"><![CDATA[chanrelay.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43014#p43014"><![CDATA[
/me bow to the might of user<br><br><br>all i need now is for someone to create the parsing and formatting side of it<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5488">TurboChicken</a> — Mon Nov 22, 2004 8:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-11-22T20:31:17-04:00</updated>

		<published>2004-11-22T20:31:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43012#p43012</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43012#p43012"/>
		<title type="html"><![CDATA[chanrelay.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43012#p43012"><![CDATA[
<blockquote class="uncited"><div>if i just do it as a plain relay atm... what should i put in?</div></blockquote>what do you mean by "plain" and "put in"? Try the script and see what happens?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Mon Nov 22, 2004 8:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TurboChicken]]></name></author>
		<updated>2004-11-22T20:35:23-04:00</updated>

		<published>2004-11-22T20:28:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43011#p43011</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43011#p43011"/>
		<title type="html"><![CDATA[chanrelay.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43011#p43011"><![CDATA[
if i just do it as a plain relay (as in no parsing etc.) atm... what should i put in?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5488">TurboChicken</a> — Mon Nov 22, 2004 8:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-11-22T19:53:39-04:00</updated>

		<published>2004-11-22T19:53:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43007#p43007</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43007#p43007"/>
		<title type="html"><![CDATA[?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43007#p43007"><![CDATA[
<blockquote class="uncited"><div>preferably i would like it to parse what is said in one channel before it outputs it to another<br><br>(extract_data1)-››-[extract_data2]<br><br>and then have some way to format the output.</div></blockquote>How about using regexp to do the parsing? Or would you like us to invent some other kind of generic text parser? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><div class="codebox"><p>Code: </p><pre><code># in bot1 (the one listening for messages):bind pubm R "#chan1 *" pub:relayproc pub:relay {n u h c a} {    # insert parsing/formatting here :P    putbot bot2 "rmsg &lt;$n&gt; $a"}# in bot2 (the one displaying the messages):bind bot R rmsg bot:relayproc bot:relay {b k a} {puthelp "PRIVMSG #chan2 :$a"}</code></pre></div>in bot1, do:<br><strong class="text-strong">.+user relay TheNickToRelay!*@*<br>.chattr relay +R</strong><br><br>in bot2:<br><strong class="text-strong">.chattr bot1 +R</strong><br><br>PS: make sure you change "#chan1", "#chan2" to the real channel names and "bot2" to the right botnick<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Mon Nov 22, 2004 7:53 pm</p><hr />
]]></content>
	</entry>
	</feed>
