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

	<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-05-11T19:37:37-04:00</updated>

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

		<entry>
		<author><name><![CDATA[honeybee]]></name></author>
		<updated>2006-05-11T19:37:37-04:00</updated>

		<published>2006-05-11T19:37:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62946#p62946</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62946#p62946"/>
		<title type="html"><![CDATA[getting problem with matching pattern.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62946#p62946"><![CDATA[
Ok thanks i did it myself.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7174">honeybee</a> — Thu May 11, 2006 7:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-05-10T20:51:55-04:00</updated>

		<published>2006-05-10T20:51:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62913#p62913</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62913#p62913"/>
		<title type="html"><![CDATA[getting problem with matching pattern.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62913#p62913"><![CDATA[
<blockquote class="uncited"><div>a) foreach uses 3 arguments only</div></blockquote>Not necessarily:<blockquote class="uncited"><div><strong class="text-strong">NAME</strong><br><br>foreach - Iterate over all elements in one or more lists<br><br><strong class="text-strong">SYNOPSIS</strong><br><br>foreach varname list body<br>foreach varlist1 list1 ?varlist2 list2 ...? body</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Wed May 10, 2006 8:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-05-11T04:05:50-04:00</updated>

		<published>2006-05-10T20:18:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62911#p62911</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62911#p62911"/>
		<title type="html"><![CDATA[getting problem with matching pattern.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62911#p62911"><![CDATA[
your quoted line will most likely never be compiled because<br>a) foreach uses 3 arguments only<br>b) there is no function called 0 or 1 (you are missing some conditional structure)<br><br>PS: you still have a string match that will never be true, because the pattern contains string parts that $host can never ever have.<br><br>Edit: then you will get the split string match line as addionatl list elements @_o<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Wed May 10, 2006 8:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[honeybee]]></name></author>
		<updated>2006-05-10T18:32:18-04:00</updated>

		<published>2006-05-10T18:32:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62893#p62893</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62893#p62893"/>
		<title type="html"><![CDATA[getting problem with matching pattern.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62893#p62893"><![CDATA[
Ok fine, [lindex [split $uhost @] 1] will return with the host and then i match it with the <div class="codebox"><p>Code: </p><pre><code>set host "[lindex [split $uhost @] 1]"foreach user [userlist o] {foreach userhost [getuser $user hosts] {![string match -nocase $userhost $host]} { do something }</code></pre></div>and i aslo want to ask foreach user [userlist o] { putlog "[getuser $user hosts]"} it returns hosts of the respective flags, is it a string or something or should i use it in "" here <blockquote class="uncited"><div>![string match -nocase "$userhost" $host]</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7174">honeybee</a> — Wed May 10, 2006 6:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-05-10T06:34:14-04:00</updated>

		<published>2006-05-10T06:34:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62879#p62879</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62879#p62879"/>
		<title type="html"><![CDATA[getting problem with matching pattern.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62879#p62879"><![CDATA[
hosts are not "user.domain.com" but "*!*@user.domain.com" therefore you need to at least match against "!$uhost". Without ! there will be no match. And if you want to completly ignore any possible entries in host for idents then split them off using [lindex [split $host @] 1].<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Wed May 10, 2006 6:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[honeybee]]></name></author>
		<updated>2006-05-09T15:39:24-04:00</updated>

		<published>2006-05-09T15:39:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62850#p62850</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62850#p62850"/>
		<title type="html"><![CDATA[getting problem with matching pattern.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62850#p62850"><![CDATA[
any help please?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7174">honeybee</a> — Tue May 09, 2006 3:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[honeybee]]></name></author>
		<updated>2006-05-09T05:21:34-04:00</updated>

		<published>2006-05-09T05:21:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62829#p62829</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62829#p62829"/>
		<title type="html"><![CDATA[getting problem with matching pattern.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62829#p62829"><![CDATA[
well, i cant use [finduser] cause i want to match *!@$uhost against all the hosts of particular flag let it be +f like [userlist f|f $chan] or something. and if that nick is a validuser [validuser $nick] and his/her *!@$uhost doesnt match with our particular flag's host { do soemthing }, thats what i want to do.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7174">honeybee</a> — Tue May 09, 2006 5:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2006-05-09T02:03:14-04:00</updated>

		<published>2006-05-09T02:03:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62821#p62821</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62821#p62821"/>
		<title type="html"><![CDATA[getting problem with matching pattern.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62821#p62821"><![CDATA[
<em class="text-italics">$uhost</em> means user@host, i.e. no nick; whereas userfile record's HOSTS list is interpreted as consisting of full hostmasks, i.e. <em class="text-italics">nick!user@host</em><br><br>so you need to use <em class="text-italics">*!$uhost</em> instead of <em class="text-italics">$uhost</em><br><br>or use [finduser]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue May 09, 2006 2:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[honeybee]]></name></author>
		<updated>2006-05-08T22:19:20-04:00</updated>

		<published>2006-05-08T22:19:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62816#p62816</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62816#p62816"/>
		<title type="html"><![CDATA[getting problem with matching pattern.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62816#p62816"><![CDATA[
Hey,<br>I'm again stuck with a part of my tcl.<br>i m trying to get info from userlist and matchin it with the $uhost and if it doesnt match do something. I don't think i m doing it correctly.<br><div class="codebox"><p>Code: </p><pre><code>foreach user [userlist ] {  foreach host [getuser $user hosts] {     if {![string match -nocase $host $uhost]} { do something }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7174">honeybee</a> — Mon May 08, 2006 10:19 pm</p><hr />
]]></content>
	</entry>
	</feed>
