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

	<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>2012-02-17T19:50:54-04:00</updated>

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

		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2012-02-17T19:50:54-04:00</updated>

		<published>2012-02-17T19:50:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98815#p98815</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98815#p98815"/>
		<title type="html"><![CDATA[Re: url title help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98815#p98815"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>foreach word [split $text] {if {[string length $word] &gt;= $urltitle(length) &amp;&amp; \[regexp {^(f|ht)tp(s|)://} $word] &amp;&amp; \![regexp {://([^/:]*:([^/]*@|\d+(/|$))|.*/\.)} $word]} {set urltitle(last) [unixtime]set urtitle [urltitle $word]if {[string length $urtitle]} {switch -glob -- $word {*http://forum.gordonsys.net/showthread.php?* {puthelp "PRIVMSG $chan :\002GordonSys\002: \"$urtitle\"" }}}break}}</code></pre></div>You removed too much of the original code. You removed the foreach which iterates over every word of input. I also added a switch statement and body too. These are more efficient than a ton of nested if's. If you wish to add to the switch statement add the bodies exactly as I have done.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Fri Feb 17, 2012 7:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[PrE]]></name></author>
		<updated>2012-02-17T18:53:49-04:00</updated>

		<published>2012-02-17T18:53:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98814#p98814</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98814#p98814"/>
		<title type="html"><![CDATA[url title help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98814#p98814"><![CDATA[
So i got this script and modified it a little to my needs but there is a problem i can't fix.<br><br>I don't want it to send the text, just the link but it sends the whole line before the link and after the link.<br><div class="codebox"><p>Code: </p><pre><code>bla link.com</code></pre></div><br>but i want it to ignore text and just send the link to the server<br><br>it sends the request the php script with that text<br>like<br>host.com/script.php?i=bla link.com<br><br>which returns an error to irc.<br><div class="codebox"><p>Code: </p><pre><code>if {[string length $word] &gt;= $urltitle(length) &amp;&amp; \[regexp {^(f|ht)tp(s|)://} $word] &amp;&amp; \![regexp {://([^/:]*:([^/]*@|\d+(/|$))|.*/\.)} $word]} {set urltitle(last) [unixtime]set urtitle [urltitle $word]if {[string match *http://forum.gordonsys.net/showthread.php?* $word]} {puthelp "PRIVMSG $chan :\002GordonSys\002: \"$urtitle\""}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11890">PrE</a> — Fri Feb 17, 2012 6:53 pm</p><hr />
]]></content>
	</entry>
	</feed>
