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

	<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>2003-06-16T15:04:18-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Solarin]]></name></author>
		<updated>2003-06-16T15:04:18-04:00</updated>

		<published>2003-06-16T15:04:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21957#p21957</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21957#p21957"/>
		<title type="html"><![CDATA[string match problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21957#p21957"><![CDATA[
Well I took user's suggestion at the bottom of his post.  That is much better now.  I don't receive any more errors.  <br><br>Thanks for the post stdragon.  I did not think anything of the == 1 being taken as arguments.  I'll keep that in mind next time.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2990">Solarin</a> — Mon Jun 16, 2003 3:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2003-06-16T14:56:32-04:00</updated>

		<published>2003-06-16T14:56:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21952#p21952</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21952#p21952"/>
		<title type="html"><![CDATA[string match problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21952#p21952"><![CDATA[
Well you have this bit:<br><br>[string match \[a-z\] [string index $ident 0] == 1]<br><br>Now, the way you have that written, these are the arguments:<br><br>match<br>\[a-z\]<br>[string index $ident 0]<br>==<br>1<br><br>Tcl is treating "==" as a string argument to the command, because it's inside the [ ] with the rest of the parameters. Probably you meant for the ] after the 1 to actually be before the ==.<br><br>Do yourself a favor and split that horrible mess into a couple different lines heh. Also take a look at what User said.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Mon Jun 16, 2003 2:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Solarin]]></name></author>
		<updated>2003-06-16T14:51:17-04:00</updated>

		<published>2003-06-16T14:51:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21949#p21949</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21949#p21949"/>
		<title type="html"><![CDATA[string match problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21949#p21949"><![CDATA[
I escaped the brackets and now I receive the following error:<br>Tcl error [join:nospam]: wrong # args: should be "string match ?-nocase? pattern string"<br><div class="codebox"><p>Code: </p><pre><code>if {[string match \[a-z\] [string index $ident 0] == 1] &amp;&amp; [string match \[0-9\] [string index $ident 1] == 1] &amp;&amp; [string match \[a-z\] [string index $ident 2] == 1] &amp;&amp; [string match \[0-9\] [string index $ident 3] == 1] &amp;&amp; [string match \[a-z\] [string index $ident 4] == 1]} {</code></pre></div>?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2990">Solarin</a> — Mon Jun 16, 2003 2:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-06-16T14:39:55-04:00</updated>

		<published>2003-06-16T14:39:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21945#p21945</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21945#p21945"/>
		<title type="html"><![CDATA[string match problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21945#p21945"><![CDATA[
escape the brackets (\[a-z\])<br><br>btw: you can do [string match \[a-z\]\[0-9\]\[a-z\]\[0-9\]\[a-z\] $ident] if the number/order of chars is always the same.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Mon Jun 16, 2003 2:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Solarin]]></name></author>
		<updated>2003-06-16T14:26:10-04:00</updated>

		<published>2003-06-16T14:26:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21942#p21942</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21942#p21942"/>
		<title type="html"><![CDATA[string match problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21942#p21942"><![CDATA[
Help with error:<br>Tcl error [join:nospam]: invalid command name "a-z"<br><br>The code is as follows:<br><div class="codebox"><p>Code: </p><pre><code>bind join - * join:nospamproc join:nospam {nick host hand chan} {   set ident [string range $host [string first ! $host] [string first @ $host]]  if {[string match [a-z] [string index $ident 0] == 1] &amp;&amp; [string match [0-9] [string index $ident 1] == 1] &amp;&amp; [string match [a-z] [string index $ident 2] == 1] &amp;&amp; [string match [0-9] [string index $ident 3] == 1] &amp;&amp; [string match [a-z] [string index $ident 4] == 1]} {    putserv "KICK $chan $nick :Spamming ident."    newban [string trimleft [maskhost [getchanhost $nick $chan]] ~] NoSpam "Spamming ident." $spambantime  }}</code></pre></div>Basically, I want to kick and ban any user with the alpha-number-alpha-number-alpha type ident (i.e. o1j2e).<br>This is a widely used type of spamming ident on Austnet and the ident always follows such a pattern.  It would be nice to get this working.<br><br>Your help is appreciated.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2990">Solarin</a> — Mon Jun 16, 2003 2:26 pm</p><hr />
]]></content>
	</entry>
	</feed>
