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

	<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>2007-03-20T21:31:21-04:00</updated>

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

		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-03-20T21:31:21-04:00</updated>

		<published>2007-03-20T21:31:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71431#p71431</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71431#p71431"/>
		<title type="html"><![CDATA[problem with http error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71431#p71431"><![CDATA[
Some chars are not valid in url's, so you'd have to convert them to hex strings. For example, in the steamid script I made, I use:<div class="codebox"><p>Code: </p><pre><code># This is a global var, outside of any procs:set sidmap {"\ " +  : %3A  \\ %5C%5C  \[ %5B  \] %5D  \# %23  \" %22    \' %27  ! %21  @ %40$ %24  \( %28  \) %29  ~  %7E  `  %60  %  %25   ^   %5E  \&amp; %26  = %3D  + %2B| %7C  \{ %7B  \} %7D  /  %2F  \? %3F  ,  %2C   &lt;   %3C   &gt; %3E  ; %3B}</code></pre></div>and then within procs to use the sidmap:<div class="codebox"><p>Code: </p><pre><code> set url [string map -nocase $::sidmap $url]</code></pre></div>That's the basic idea, mine's slightly different (I use split on the input and then join within the set url part..)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Tue Mar 20, 2007 9:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-03-20T09:15:47-04:00</updated>

		<published>2007-03-20T09:15:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71413#p71413</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71413#p71413"/>
		<title type="html"><![CDATA[problem with http error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71413#p71413"><![CDATA[
First off, this script is buggy. It uses list-commands on untrusted string sources, which is a very, very bad idea. Secondly, the composition of the url used with ::http::geturl does'nt make much sense to me; it's an external string(?) concatenated with a list (from either split:ing $nick or $arg).<br><br>split should not be used as an escaping-function; it only servers the purpose of converting a string into a list.<br><br>It would also be helpful with some information to which http-package/library you are using. My guess would be that you're using tcl's http-package version 2.x. However, I have not been able to find that error-message in any of the versions I have available.<br><br>But to your question, if you don't wish to solve this problem, but just make your bot ignore it, find which command causes the error, and enclose it in a catch-statement (see manpage for catch on how to do this).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Tue Mar 20, 2007 9:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mikele]]></name></author>
		<updated>2007-03-20T06:45:14-04:00</updated>

		<published>2007-03-20T06:45:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71409#p71409</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71409#p71409"/>
		<title type="html"><![CDATA[problem with http error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71409#p71409"><![CDATA[
Hi,<br>I have here a script which display the status of the user <br><br><div class="codebox"><p>Code: </p><pre><code>proc web:read {nick host hand chan arg} {global urlif {[llength $arg] == 0} { set statususer [split $nick]} else {   set statususer [split $arg]}   ::http::config -useragent "Mozilla/4.75 (X11; U; FreeBSD 6.1; i586; Nav)"   set http [::http::data [::http::geturl $url$statususer]]...</code></pre></div>it works fine, but if in the $statususer a"[" or "]" it will call an error<br>Tcl error [web:read]: Illegal characters in URL path<br><br>simple question, how can I teach the bot to ignore this error ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8796">mikele</a> — Tue Mar 20, 2007 6:45 am</p><hr />
]]></content>
	</entry>
	</feed>
