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

	<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>2009-02-12T13:24:22-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Fill]]></name></author>
		<updated>2009-02-12T13:24:22-04:00</updated>

		<published>2009-02-12T13:24:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87370#p87370</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87370#p87370"/>
		<title type="html"><![CDATA[Checking nicknames]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87370#p87370"><![CDATA[
Hi jeroen_005<br><br>You can use strings to do that. If you want to see if a certain nick IamJeroen has "Jeroen", just use this:<br><div class="codebox"><p>Code: </p><pre><code>proc { ... } {if { ([string first jeroen $nick] !=-1) } { ... }}</code></pre></div>Here's an explanation for the "string first" command:<br><blockquote class="uncited"><div>string first string1 string2<br>    Search string2 for a sequence of characters that exactly match the<br>    characters in string1.  If found, return the index of the first character<br>    in the first such match within string2.  If not found, return -1.</div></blockquote>(Taken from: <a href="http://johoho.eggheads.org/eggdrop/other/guide2tcl.html" class="postlink">http://johoho.eggheads.org/eggdrop/other/guide2tcl.html</a>)<br><br><br>Which means that, in this case, if the return is different from -1, *jeroen* is in the specified nickname. You don't want the index of the first character tha tmatch the other string, so you just have to say the bot that when this is different from -1, make the procedure you'll write.<br><br>Understood that?<br><br>See ya,<br>Fill<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10430">Fill</a> — Thu Feb 12, 2009 1:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[jeroen_005]]></name></author>
		<updated>2009-02-12T12:39:59-04:00</updated>

		<published>2009-02-12T12:39:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87368#p87368</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87368#p87368"/>
		<title type="html"><![CDATA[Checking nicknames]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87368#p87368"><![CDATA[
Hi,<br><br>How can i check if a username contains some letters <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> Something like the nick contains "Jeroen" <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><br>Greetings<br><br>Jeroen<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10007">jeroen_005</a> — Thu Feb 12, 2009 12:39 pm</p><hr />
]]></content>
	</entry>
	</feed>
