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

	<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>2005-09-23T16:04:34-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Scott]]></name></author>
		<updated>2005-09-23T16:04:34-04:00</updated>

		<published>2005-09-23T16:04:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56020#p56020</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56020#p56020"/>
		<title type="html"><![CDATA[Query String]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56020#p56020"><![CDATA[
Ahh right, thanks for the input <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Will have another go!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5241">Scott</a> — Fri Sep 23, 2005 4:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-09-23T15:44:30-04:00</updated>

		<published>2005-09-23T15:44:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56019#p56019</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56019#p56019"/>
		<title type="html"><![CDATA[Query String]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56019#p56019"><![CDATA[
do not use [lindex] on a string directly, [split] that string first<br><br>and instead of patching into url-encoded string, use [::http::formatQuery]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Fri Sep 23, 2005 3:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Scott]]></name></author>
		<updated>2005-09-23T12:57:29-04:00</updated>

		<published>2005-09-23T12:57:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56018#p56018</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56018#p56018"/>
		<title type="html"><![CDATA[Query String]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56018#p56018"><![CDATA[
Hi and thanks for that....<br><br>I'll try and place that in my code, might be back if it dont work <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br>Edit: It didnt work <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> This is the code i have (edited from another tcl i found, author unknown)<br><div class="codebox"><p>Code: </p><pre><code>proc pub:file { nick uhost handle channel arg } { global agentif {[llength $arg]==0} {putserv "PRIVMSG $channel :FFS! Use The Correct Syntax! !file FILENAME"} else {set searchphrase "searchphrase" set query "http://www.WEBSITE.com/search/query/p/?q=${searchphrase}&amp;Category=-1&amp;searchFP=p"set query "$query[lindex $arg 0]"#putserv "PRIVMSG $channel :$query"                set token [http::config -useragent $agent]set token [http::geturl $query]set html  [http::data $token]puts stderr ""upvar #0 $token stateset max 0#foreach {name value} $state(meta) {#putserv "PRIVMSG $channel :$value"#}#putserv "PRIVMSG $channel :$html"set result "[lindex $html 1]"set result [string range $result [expr [string first = $result]+2] [expr [string first &gt; $result]-2]]putserv "PRIVMSG $channel :$result"}}</code></pre></div>When i type, !File Dredd  in the channel to test, i get the following error:<br><br>[12:59] Tcl error [pub:file]: list element in quotes followed by "&gt;" instead of space<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5241">Scott</a> — Fri Sep 23, 2005 12:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-09-23T12:18:05-04:00</updated>

		<published>2005-09-23T12:18:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56017#p56017</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56017#p56017"/>
		<title type="html"><![CDATA[Query String]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56017#p56017"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set searchphrase "searchphrase"set searchurl "http://www.WEBSITE.com/search/query/p/?q=${searchphrase}&amp;Category=-1&amp;searchFP=p"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Fri Sep 23, 2005 12:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Scott]]></name></author>
		<updated>2005-09-23T11:30:02-04:00</updated>

		<published>2005-09-23T11:30:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56016#p56016</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56016#p56016"/>
		<title type="html"><![CDATA[Query String]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56016#p56016"><![CDATA[
Hi All<br><br>Im trying to build a TCL script that will search a site for a file, however the default search has the search string in the middle of the query. So im trying to make it so i can split the search URL and add a word in the middle...<br><br><a href="http://www.WEBSITE.com/search/query/p/?q=%5Bb%5DSEARCHPHRASE" class="postlink">http://www.WEBSITE.com/search/query/p/? ... ARCHPHRASE</a>[/b]&amp;Category=-1&amp;searchFP=p<br><br>How would i be able to do that in tcl?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5241">Scott</a> — Fri Sep 23, 2005 11:30 am</p><hr />
]]></content>
	</entry>
	</feed>
