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

	<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-08-07T11:28:13-04:00</updated>

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

		<entry>
		<author><name><![CDATA[krimson]]></name></author>
		<updated>2006-08-07T03:01:07-04:00</updated>

		<published>2006-08-07T03:01:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65226#p65226</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65226#p65226"/>
		<title type="html"><![CDATA[results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65226#p65226"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>set userhost [getchanhost $user $chan]</code></pre></div></div></blockquote>this provides you the ident@host part<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7663">krimson</a> — Mon Aug 07, 2006 3:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ap]]></name></author>
		<updated>2006-08-06T18:08:52-04:00</updated>

		<published>2006-08-06T18:08:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65217#p65217</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65217#p65217"/>
		<title type="html"><![CDATA[results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65217#p65217"><![CDATA[
thank you , but how do i get ident@host<br><blockquote class="uncited"><div>set userhost [getchanhost $user $chan] <br>if {[string match "*.users.undernet.org" $ userhost]} { <br>  set h [lindex [split $userhost "@"] end] <br>} ... </div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7851">ap</a> — Sun Aug 06, 2006 6:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2006-08-07T11:28:13-04:00</updated>

		<published>2006-08-06T15:25:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65210#p65210</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65210#p65210"/>
		<title type="html"><![CDATA[results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65210#p65210"><![CDATA[
There are quite a few flaws in that code:<br>1. You iterate through all members of a channel, doing that check; but each time you overwrite the result of the previous test.. Unless you use $h further down inside that foreach-loop, that would not make sense<br><br>2. You are mixing lists and string commands; this is a BIG no-do. If you wish to use list-commands, you'll have to convert the string to a list, using commands such as "list" or "split".<br><br>If you wish to isolate the hostname part from nick!ident@hostname, I'd suggest something like this:<div class="codebox"><p>Code: </p><pre><code>...set userhost [getchanhost $user $chan]if {[string match "*.users.undernet.org" $userhost]} {  set h [lindex [split $userhost "@"] end]} ...</code></pre></div>Of course, you'd still have to do something useful with $h before you close the foreach-loop...<br><br><em class="text-italics">edit:</em> Removed an accidental space between $ and userhost in the example-code<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sun Aug 06, 2006 3:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ap]]></name></author>
		<updated>2006-08-06T14:37:52-04:00</updated>

		<published>2006-08-06T14:37:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65209#p65209</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65209#p65209"/>
		<title type="html"><![CDATA[results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65209#p65209"><![CDATA[
well i am going thorugh the chanlist and i check if user has undernet host, if yes then i save to a variable, in the above code i set that to "h", if no then i move "n/a" but there must be the better way. i think something is fishy in the above codes because bot doesn't check his host even that's undernet host. i need the codes so it check the chanlist and it should check if user has a undernost host, if yes then write to the variaable if not then write "n/a"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7851">ap</a> — Sun Aug 06, 2006 2:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[krimson]]></name></author>
		<updated>2006-08-06T14:31:39-04:00</updated>

		<published>2006-08-06T14:31:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65208#p65208</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65208#p65208"/>
		<title type="html"><![CDATA[results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65208#p65208"><![CDATA[
well, what your code does there is check each host if it matches *.users.undernet.org and overwrites the variable $h until the last user to be checked.<br><br>i'm not sure what you want to do with this, so if you'd be more specific i could help out with some code<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7663">krimson</a> — Sun Aug 06, 2006 2:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ap]]></name></author>
		<updated>2006-08-06T13:58:40-04:00</updated>

		<published>2006-08-06T13:58:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65207#p65207</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65207#p65207"/>
		<title type="html"><![CDATA[results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65207#p65207"><![CDATA[
Hi, I am going thorugh the chanlist to save the userslist to the variable if they have a undernet host, if they don't have a undernet host then i don't save it.<br>I am using the following codes but sometime it missed some undernet hosts and sometime it works fine. Is there any better way to do it? thanks<br><div class="codebox"><p>Code: </p><pre><code>foreach user [chanlist $chan]] {     set userhost [getchanhost $user $chan]      if {[string match "*.users.undernet.org" $userhost]} {     set h [lindex $userhost [lsearch -glob $userhost *.users.undernet.org]]} else {      set h "N/A"      }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7851">ap</a> — Sun Aug 06, 2006 1:58 pm</p><hr />
]]></content>
	</entry>
	</feed>
