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

	<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>2006-04-16T05:24:50-04:00</updated>

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

		<entry>
		<author><name><![CDATA[T-Xorcist]]></name></author>
		<updated>2006-04-16T05:24:50-04:00</updated>

		<published>2006-04-16T05:24:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61985#p61985</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61985#p61985"/>
		<title type="html"><![CDATA[Remove # in front off channel.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61985#p61985"><![CDATA[
Thank you all for giving me so much choice of doing it LoL!<br><br>Thnx! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cool.gif" width="15" height="15" alt="8)" title="Cool"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6980">T-Xorcist</a> — Sun Apr 16, 2006 5:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-04-15T06:03:44-04:00</updated>

		<published>2006-04-15T06:03:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61951#p61951</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61951#p61951"/>
		<title type="html"><![CDATA[Remove # in front off channel.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61951#p61951"><![CDATA[
Well, on my pc {^#} was faster<blockquote class="uncited"><div>% time {regsub {^#} #chan chan} 10000<br>3.0633 microseconds per iteration<br>% time {regsub {#} #chan chan} 10000<br>3.2233 microseconds per iteration<br>% time {regsub {^#} #chan chan}<br>27 microseconds per iteration<br>% time {regsub {#} #chan chan}<br>28 microseconds per iteration</div></blockquote>But, it doesn't really matter, the difference isn't that big or near to big <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>Interrestingly, on 100 iterations {#} is faster:<blockquote class="uncited"><div>% time {regsub {^#} #chan chan} 100<br>3.53 microseconds per iteration<br>% time {regsub {#} #chan chan} 100<br>3.37 microseconds per iteration</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Apr 15, 2006 6:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragnLord]]></name></author>
		<updated>2006-04-14T21:33:27-04:00</updated>

		<published>2006-04-14T21:33:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61929#p61929</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61929#p61929"/>
		<title type="html"><![CDATA[Remove # in front off channel.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61929#p61929"><![CDATA[
<blockquote class="uncited"><div>They depend entirely on the efficiency of the computer they are being tested on.</div></blockquote>And I really can't see where microseconds will matter terribly (nor can I imagine a script where the exact same command is given in a procedure a hundred times in a row).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4461">DragnLord</a> — Fri Apr 14, 2006 9:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2006-04-14T21:25:41-04:00</updated>

		<published>2006-04-14T21:25:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61928#p61928</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61928#p61928"/>
		<title type="html"><![CDATA[Remove # in front off channel.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61928#p61928"><![CDATA[
<blockquote class="uncited"><div>Maybe those time tests aren't really that accurate. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"></div></blockquote>They depend entirely on the efficiency of the computer they are being tested on.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Fri Apr 14, 2006 9:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragnLord]]></name></author>
		<updated>2006-04-14T21:04:35-04:00</updated>

		<published>2006-04-14T21:04:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61927#p61927</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61927#p61927"/>
		<title type="html"><![CDATA[Remove # in front off channel.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61927#p61927"><![CDATA[
<blockquote class="uncited"><div>If you want it to still be neat but faster:<div class="codebox"><p>Code: </p><pre><code>regsub {^#} $chan {} chan</code></pre></div>This will save time since it will check only the first character if it matches '#' instead of the whole string.</div></blockquote>I would have thought so as well, until I ran the time tests.<div class="codebox"><p>Code: </p><pre><code>% time {regsub {#} #chan {} chan} 1004.9 microseconds per iteration% time {regsub {^#} #chan {} chan} 1005.05 microseconds per iteration</code></pre></div>Maybe those time tests aren't really that accurate.  <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=4461">DragnLord</a> — Fri Apr 14, 2006 9:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-04-14T20:39:33-04:00</updated>

		<published>2006-04-14T20:39:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61926#p61926</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61926#p61926"/>
		<title type="html"><![CDATA[Remove # in front off channel.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61926#p61926"><![CDATA[
If you want it to still be neat but faster:<div class="codebox"><p>Code: </p><pre><code>regsub {^#} $chan {} chan</code></pre></div>This will save time since it will check only the first character if it matches '#' instead of the whole string.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Fri Apr 14, 2006 8:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2006-04-14T20:19:22-04:00</updated>

		<published>2006-04-14T20:19:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61925#p61925</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61925#p61925"/>
		<title type="html"><![CDATA[Remove # in front off channel.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61925#p61925"><![CDATA[
.. and a whole 2 microseconds is going to be a total disaster? Good grief! DragnLord's solution is not only neater but cuts code length. I prefer neat and short code.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Fri Apr 14, 2006 8:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-04-14T07:49:55-04:00</updated>

		<published>2006-04-14T07:49:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61882#p61882</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61882#p61882"/>
		<title type="html"><![CDATA[Remove # in front off channel.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61882#p61882"><![CDATA[
what about a simple [string trimleft $chan #] or [string map {# ""} $chan]? No need for any always slow regex.<br><div class="codebox"><p>Code: </p><pre><code>% time {set chan [string trimleft #channel.name #]} 1002 microseconds per iteration% time {set chan [string map {# ""} #channel.name]} 1004 microseconds per iteration% time {regsub {#} #channel.name {} chan} 1007 microseconds per iteration</code></pre></div>First might make troubles when using with opnotices which target is @#channel, but if you want to strip then @# anyway, you will have no trouble with it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Fri Apr 14, 2006 7:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2006-04-13T18:58:28-04:00</updated>

		<published>2006-04-13T18:58:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61866#p61866</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61866#p61866"/>
		<title type="html"><![CDATA[Remove # in front off channel.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61866#p61866"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>regsub {#} $chan {} chan</code></pre></div>Would be faster. It is neater also <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=3646">Alchera</a> — Thu Apr 13, 2006 6:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[T-Xorcist]]></name></author>
		<updated>2006-04-13T17:52:24-04:00</updated>

		<published>2006-04-13T17:52:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61864#p61864</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61864#p61864"/>
		<title type="html"><![CDATA[Remove # in front off channel.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61864#p61864"><![CDATA[
I got this solution JUST find out:<br><div class="codebox"><p>Code: </p><pre><code>regsub -all "#" $chan "" channelname</code></pre></div>Bad, not safe or?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6980">T-Xorcist</a> — Thu Apr 13, 2006 5:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragnLord]]></name></author>
		<updated>2006-04-13T17:31:32-04:00</updated>

		<published>2006-04-13T17:31:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61862#p61862</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61862#p61862"/>
		<title type="html"><![CDATA[Remove # in front off channel.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61862#p61862"><![CDATA[
here is how to strip the # off:<div class="codebox"><p>Code: </p><pre><code>regsub {#} $chan {} chan</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4461">DragnLord</a> — Thu Apr 13, 2006 5:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[T-Xorcist]]></name></author>
		<updated>2006-04-13T16:54:20-04:00</updated>

		<published>2006-04-13T16:54:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61860#p61860</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61860#p61860"/>
		<title type="html"><![CDATA[Remove # in front off channel.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61860#p61860"><![CDATA[
Hi all,<br><br>I want to execute an MySQL query with the channelname in the query, like join.php?chan=$chan.<br><br>All sounds pretty neat, but MySQL / PHP does not support the # sign.<br>My question is, how do I remove the # in front of the channel to execute the MySQL query:<br><br>Example<br>-----------<br>Bot is in #T-Xorcist<br>The query will be join.php?chan=#T-Xorcist<br>The query <strong class="text-strong">MUST</strong> be join.php?chan=T-Xorcist<br><br>Can anyone help me out with this issue?<br><br>Thanks in advance.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6980">T-Xorcist</a> — Thu Apr 13, 2006 4:54 pm</p><hr />
]]></content>
	</entry>
	</feed>
