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

	<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>2017-07-11T14:16:12-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ViciousPiranha]]></name></author>
		<updated>2017-07-11T12:42:55-04:00</updated>

		<published>2017-07-11T12:42:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106362#p106362</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106362#p106362"/>
		<title type="html"><![CDATA[Help with modification of a script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106362#p106362"><![CDATA[
Works great caesar, thank you<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12161">ViciousPiranha</a> — Tue Jul 11, 2017 12:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2017-07-09T04:47:24-04:00</updated>

		<published>2017-07-09T04:47:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106361#p106361</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106361#p106361"/>
		<title type="html"><![CDATA[Help with modification of a script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106361#p106361"><![CDATA[
You aren't missing anything cos that regexp doesn't seem to be working, at least I tried with the text you said in first post.<br><br>Anyway, if the text you want to rely has that url at the end and all you want is to relay the same text but without the url at the end then woudln't it be simplier to go with something like:<div class="codebox"><p>Code: </p><pre><code>set text [lrange $text 0 end-1]</code></pre></div>that simply eliminates the last element, turning:<blockquote class="uncited"><div>&lt;DiMarzio&gt; Transfer News Live: DEAL DONE: Napoli have signed Adam Ounas from Bordeaux for €10m, rising to €12m on a 5-year contract. (Source: BWFC) <a href="https://t.co/SekHZY3hIs" class="postlink">https://t.co/SekHZY3hIs</a></div></blockquote>into:<blockquote class="uncited"><div>&lt;DiMarzio&gt; Transfer News Live: DEAL DONE: Napoli have signed Adam Ounas from Bordeaux for €10m, rising to €12m on a 5-year contract. (Source: BWFC)</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sun Jul 09, 2017 4:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ViciousPiranha]]></name></author>
		<updated>2017-07-08T05:58:00-04:00</updated>

		<published>2017-07-08T05:58:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106358#p106358</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106358#p106358"/>
		<title type="html"><![CDATA[Help with modification of a script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106358#p106358"><![CDATA[
That didn't work for me. Do you mind writing the whole script with the change, may I missed out something?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12161">ViciousPiranha</a> — Sat Jul 08, 2017 5:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[silentziler]]></name></author>
		<updated>2017-07-11T14:16:12-04:00</updated>

		<published>2017-07-05T19:07:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106354#p106354</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106354#p106354"/>
		<title type="html"><![CDATA[If you want text after the URL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106354#p106354"><![CDATA[
If the URL is the last thing in the sentence, it will be removed.<br>If there is text remaining after the URL, the URL will remain.<br>Replace your putserv with the code below:<br><br>Updated:<br><div class="codebox"><p>Code: </p><pre><code>regexp {https://.* (..*)} $text - 2if {[info exists 2] eq "0" } {regsub {https.*} $text {} textputserv "PRIVMSG #football :$text"} else {putserv "PRIVMSG #football :$text"} </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12563">silentziler</a> — Wed Jul 05, 2017 7:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[silentziler]]></name></author>
		<updated>2017-07-05T14:07:57-04:00</updated>

		<published>2017-07-05T14:07:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106353#p106353</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106353#p106353"/>
		<title type="html"><![CDATA[Re: Help with modification of a script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106353#p106353"><![CDATA[
Add<div class="codebox"><p>Code: </p><pre><code>regsub {https.*} $text {} text</code></pre></div>before your putserv!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12563">silentziler</a> — Wed Jul 05, 2017 2:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ViciousPiranha]]></name></author>
		<updated>2017-07-04T02:08:58-04:00</updated>

		<published>2017-07-04T02:08:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106351#p106351</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106351#p106351"/>
		<title type="html"><![CDATA[Help with modification of a script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106351#p106351"><![CDATA[
Hi,<br><br>I'm using the following 'relay' script:<br><div class="codebox"><p>Code: </p><pre><code># Channel flag.setudef flag monitorText2 # Subchannel.set subchannel2 #football2 # Bind all text in all channels.bind pubm - * monitorProc2proc monitorProc2 {nick uhost hand chan text} {global subchannel2     # Check channel flag.    if {![channel get $chan monitorText2]} {        return 0    }     # Check text for matching values.       if {[string match "*DEAL DONE:*" $text] } {         # Send matching text to subchannel.        putserv "PRIVMSG #football :$text"    }</code></pre></div>And I'm looking for a modification to the script - that it will not relay a URL when it's in the end of the message<br><br>For example, it currently relays this message:<br><blockquote class="uncited"><div>&lt;DiMarzio&gt; Transfer News Live: DEAL DONE: Napoli have signed Adam Ounas from Bordeaux for €10m, rising to €12m on a 5-year contract. (Source: BWFC) <a href="https://t.co/SekHZY3hIs" class="postlink">https://t.co/SekHZY3hIs</a></div></blockquote>and I want it to relay it without the url. <br><br>Expected result:<br><blockquote class="uncited"><div><br>&lt;DiMarzio&gt; Transfer News Live: DEAL DONE: Napoli have signed Adam Ounas from Bordeaux for €10m, rising to €12m on a 5-year contract. (Source: BWFC)</div></blockquote>Help please?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12161">ViciousPiranha</a> — Tue Jul 04, 2017 2:08 am</p><hr />
]]></content>
	</entry>
	</feed>
