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

	<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>2004-09-17T11:51:24-04:00</updated>

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

		<entry>
		<author><name><![CDATA[misterys]]></name></author>
		<updated>2004-09-17T11:29:13-04:00</updated>

		<published>2004-09-17T11:29:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40985#p40985</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40985#p40985"/>
		<title type="html"><![CDATA[big &quot;string match&quot; problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40985#p40985"><![CDATA[
thanks a lot - I-WORM / Mymoon sucks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2941">misterys</a> — Fri Sep 17, 2004 11:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-09-16T20:36:24-04:00</updated>

		<published>2004-09-16T20:36:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40969#p40969</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40969#p40969"/>
		<title type="html"><![CDATA[big &quot;string match&quot; problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40969#p40969"><![CDATA[
Well you can match everything using string match and lsearch as both are almost the same however for lists using lsearch is better and faster and does not require you adding a foreach loop for each element in the list.<br><br><br>LIST MATCHING (LSEARCH)<div class="codebox"><p>Code: </p><pre><code>#Set your nicklistset nicklist "awyeah junior jumbo ariel maxy mike"#Set your identlistset identlist "user pro smoke dark evil devil child satan"#For list matching the 'nick' in the nicklistif {([lsearch -exact [split [string tolower $nicklist]] [string tolower $nick]] != -1)} { #For list matching the 'ident' in the identlistif {([lsearch -exact [split [string tolower $identlist]] [string tolower [lindex [split $uhost "@"] 0]]] != -1)} { </code></pre></div>You can also do that with string match.<br><br><br>STRING MATCHING (STRING MATCH)<div class="codebox"><p>Code: </p><pre><code>#Set your nicklistset nicklist { "awyeah" "junior" "jumbo" "ariel" "maxy" "mike" }#Set your identlistset identlist { "user" "pro" "smoke" "dark" "evil" "devil "child" satan" }#For string matching the 'nick' in the nicklistforeach newnick $nicklistif {([string match -nocase *$newnick* $nick])} {#For string matching the 'ident' in the identlistforeach newident $identlistif {([string match -nocase *$newident* [lindex [split $uhost "@"] 0]])} {</code></pre></div><br>You can do the realname one in the same way as I just mentioned either use string match or lsearch. For the realname one check this thread out, it is an entire script related to it.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green"> <br><br><a href="http://forum.egghelp.org/viewtopic.php?t=8248" class="postlink">http://forum.egghelp.org/viewtopic.php?t=8248</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Thu Sep 16, 2004 8:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[misterys]]></name></author>
		<updated>2004-09-17T11:51:24-04:00</updated>

		<published>2004-09-16T09:03:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40961#p40961</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40961#p40961"/>
		<title type="html"><![CDATA[big &quot;string match&quot; problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40961#p40961"><![CDATA[
Hi,<br><br>the script is working, but not like i want  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"> <br><br>i bind the servers' connection notice and split it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br> <br>so far so good <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">, but it's not enough to check just<br>if ident matches the list.<br>i think best way is to check is, if one part of the nickname and the realname or ident is on the list, <br>but how to do this? <br>if i use<div class="codebox"><p>Code: </p><pre><code>if { [string match $[censored] $ident ] &amp;&amp; [string match $[censored] $nick] } {</code></pre></div>nothing is working anymore. <br>maybe there is a way to do this without using "string match" ? <br><br><br><br>sorry for my bad english <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br>and thanks for help<br>misterys<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2941">misterys</a> — Thu Sep 16, 2004 9:03 am</p><hr />
]]></content>
	</entry>
	</feed>
