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

	<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>2008-03-15T02:22:39-04:00</updated>

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

		<entry>
		<author><name><![CDATA[theice]]></name></author>
		<updated>2008-03-15T02:22:39-04:00</updated>

		<published>2008-03-15T02:22:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81766#p81766</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81766#p81766"/>
		<title type="html"><![CDATA[Need Help with Userlist]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81766#p81766"><![CDATA[
Genius!<br><br>thank you so much for the idea of a if statement if its a valid user,<br><br>didn't even think of it=]<br><br>ty<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9778">theice</a> — Sat Mar 15, 2008 2:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-03-15T01:56:26-04:00</updated>

		<published>2008-03-15T01:56:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81765#p81765</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81765#p81765"/>
		<title type="html"><![CDATA[Need Help with Userlist]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81765#p81765"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pub - ${pubtrig}whois whois:pubproc whois:pub {n u h c t} {    global channel    if {![validuser [lindex [split $t] 0]]} {        set userh [nick2hand [lindex [split $t] 0]]    } else {        set userh [lindex [split $t] 0]    }    if {[matchattr $userh |f $channel]} {        puthelp "PRIVMSG $c :\002$userh is\002 \037\002Console\037\002: [getuser $userh XTRA console] \002\037Username\037\002: [getuser $userh XTRA username] \002\037Instruments:\037\002 Guitar-[getuser $userh XTRA Guitar] , Bass-[getuser $userh XTRA Bass] , VoX-[getuser $userh XTRA VoX] , Drums-[getuser $userh XTRA Drums]"       } else {        puthelp "PRIVMSG $c :Who? ... Never heard of 'em."    }}</code></pre></div>Use nick or handle, script will decide. Priority is given to handle. If valid handle isn't used, nickname is assumed. If nickname is also invalid (doesn't have +f) should see the Who? message...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sat Mar 15, 2008 1:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[theice]]></name></author>
		<updated>2008-03-14T16:30:56-04:00</updated>

		<published>2008-03-14T16:30:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81750#p81750</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81750#p81750"/>
		<title type="html"><![CDATA[Need Help with Userlist]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81750#p81750"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pub - ${pubtrig}whois whois:pubproc whois:pub {n u h c t} {global channelset userh [nick2hand [lindex [split $t] 0]] if {[matchattr $userh |f $channel]} {puthelp "PRIVMSG $c :\002$userh is\002 \037\002Console\037\002: [getuser $userh XTRA console] \002\037Username\037\002: [getuser $userh XTRA username] \002\037Instruments:\037\002 Guitar-[getuser $userh XTRA Guitar] , Bass-[getuser $userh XTRA Bass] , VoX-[getuser $userh XTRA VoX] , Drums-[getuser $userh XTRA Drums]"}}</code></pre></div>works if they are just typing .whois NICK<br>but if they are taking the list of users handles that the bot shows sometimes, and type .whois HANDLE, <br><br>it won't work unless their handle == their nick.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9778">theice</a> — Fri Mar 14, 2008 4:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-03-14T06:19:42-04:00</updated>

		<published>2008-03-14T06:19:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81738#p81738</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81738#p81738"/>
		<title type="html"><![CDATA[Need Help with Userlist]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81738#p81738"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set userh [nick2hand [lindex [split $t] 0]]if {([matchattr $userh |f $channel]) {    # user is in the userlist as friend} else {    # ain't}</code></pre></div>if {([matchattr $userh |f $channel]) || <strong class="text-strong">([matchattr $usern |f $channel])</strong>} {<br>The bold part is your problem, you can't use matchattr with nicks, it wants handles.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Fri Mar 14, 2008 6:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[theice]]></name></author>
		<updated>2008-03-14T05:47:53-04:00</updated>

		<published>2008-03-14T05:47:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81737#p81737</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81737#p81737"/>
		<title type="html"><![CDATA[Need Help with Userlist]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81737#p81737"><![CDATA[
last question... just making this work a litte better<br><div class="codebox"><p>Code: </p><pre><code>set usern [lindex [split $t] 0] set userh [nick2hand $usern]if {([matchattr $userh |f $channel]) || ([matchattr $usern |f $channel])} {</code></pre></div>the user jaedaen is showing up in the users list [eval userlist] but saying not a real user when I use the above if statement<br><br>is that || not used correctly?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9778">theice</a> — Fri Mar 14, 2008 5:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-03-14T05:36:20-04:00</updated>

		<published>2008-03-14T05:36:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81736#p81736</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81736#p81736"/>
		<title type="html"><![CDATA[Need Help with Userlist]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81736#p81736"><![CDATA[
Execution time. The example using == takes longer.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Fri Mar 14, 2008 5:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[theice]]></name></author>
		<updated>2008-03-14T05:18:27-04:00</updated>

		<published>2008-03-14T05:18:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81735#p81735</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81735#p81735"/>
		<title type="html"><![CDATA[Need Help with Userlist]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81735#p81735"><![CDATA[
whats the difference?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9778">theice</a> — Fri Mar 14, 2008 5:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-03-14T05:06:18-04:00</updated>

		<published>2008-03-14T05:06:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81734#p81734</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81734#p81734"/>
		<title type="html"><![CDATA[Need Help with Userlist]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81734#p81734"><![CDATA[
<blockquote class="uncited"><div>change of subject;<br><br>is if {[lindex [split $t] 3] == "Whatever"} {<br><br>always case-sensitive?</div></blockquote>yes, use <div class="codebox"><p>Code: </p><pre><code>if {[string tolower [lindex [split $t] 3]] == "whatever"} {</code></pre></div>instead, in effect becoming case insensitive..or even <div class="codebox"><p>Code: </p><pre><code>if {[string equal -nocase [lindex [split $t] 3] "whatever"]} {</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Fri Mar 14, 2008 5:06 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[theice]]></name></author>
		<updated>2008-03-14T05:01:16-04:00</updated>

		<published>2008-03-14T05:01:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81733#p81733</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81733#p81733"/>
		<title type="html"><![CDATA[Need Help with Userlist]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81733#p81733"><![CDATA[
change of subject;<br><br>is if {[lindex [split $t] 3] == "Whatever"} {<br><br>always case-sensitive?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9778">theice</a> — Fri Mar 14, 2008 5:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-03-14T04:08:10-04:00</updated>

		<published>2008-03-14T04:08:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81731#p81731</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81731#p81731"/>
		<title type="html"><![CDATA[Need Help with Userlist]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81731#p81731"><![CDATA[
<blockquote class="uncited"><div>no you are just confusing me. sorry I don't think you understand the way im trying to do it =[ I'm ONE line away from it being perfect, and can't figure it out.</div></blockquote>HAW.. I totally understand how you want to do it. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><div class="codebox"><p>Code: </p><pre><code>set consoles [split "xbox ps3"]set styles [split "guitar bass vox drums"]set difficulties [split "easy medium hard expert"]if {[llength [split $t]] != 3 || [lsearch -exact $consoles [string tolower [lindex [split $t] 0]]] &lt; 0 || [lsearch -exact $styles [string tolower [lindex [split $t] 1]]] &lt; 0 || [lsearch -exact $difficulties [string tolower [lindex [split $t] 2]]] &lt; 0} {    putserv "NOTICE $n :\002Syntax error:\002 please use (.search console [XBox/PS3] [Guitar/Bass/VoX/Drums] [Easy/Medium/Hard/Expert]) ie \002.search console PS3 VoX Expert\002"} else {    set console [string tolower [lindex [split $t] 0]]    set style [string tolower [lindex [split $t] 1]]    set difficulty [string tolower [lindex [split $t] 2]]    # rest of script goes here}##no-word-wrap#################################################################################################################################################################################################################################################################</code></pre></div>The above code, stores your search terms you want to appear in lists above. Clearly you see this. First we check list length, if it isnt 3 they fudged up. Next we use lsearch to check our search term lists against the users split input using their positions against this list, if we don't find it trigger the message. It's very simple. This works.<br><br>PS. What I'm trying to tell you, is your more than one line away from doing it. This is how you do it elegantly, allowing you to easily change those lists to accept less or more terms. Hard coding them is messy.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Fri Mar 14, 2008 4:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[theice]]></name></author>
		<updated>2008-03-14T04:05:17-04:00</updated>

		<published>2008-03-14T04:05:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81730#p81730</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81730#p81730"/>
		<title type="html"><![CDATA[Need Help with Userlist]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81730#p81730"><![CDATA[
no you are just confusing me. sorry I don't think you understand the way im trying to do it =[ I'm ONE line away from it being perfect, and can't figure it out.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9778">theice</a> — Fri Mar 14, 2008 4:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-03-14T04:16:21-04:00</updated>

		<published>2008-03-14T03:59:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81729#p81729</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81729#p81729"/>
		<title type="html"><![CDATA[Need Help with Userlist]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81729#p81729"><![CDATA[
<blockquote class="uncited"><div>what i need is a line that will work:<br><div class="codebox"><p>Code: </p><pre><code>if {([whatever == blankline]) &amp;&amp; ([lindex [split $t] 1] == "XBox") || ([lindex [split $t] 1] == "PS3")} {#morecodehere</code></pre></div>so that way will only do the things #morecodehere if<br>someone types .search console XBox or .search console PS3<br><br>I know how to make it so it only works if they type those, but I want to make it so people can't type more stupid stuff after the third word PS3/XBox<br><br>confusing?</div></blockquote>edited post above to be exact same thing, do you understand this at all?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Fri Mar 14, 2008 3:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[theice]]></name></author>
		<updated>2008-03-14T03:59:09-04:00</updated>

		<published>2008-03-14T03:59:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81728#p81728</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81728#p81728"/>
		<title type="html"><![CDATA[Need Help with Userlist]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81728#p81728"><![CDATA[
what i need is a line that will work:<br><div class="codebox"><p>Code: </p><pre><code>if {([whatever == blankline]) &amp;&amp; ([lindex [split $t] 1] == "XBox") || ([lindex [split $t] 1] == "PS3")} {#morecodehere</code></pre></div>so that way will only do the things #morecodehere if<br>someone types .search console XBox or .search console PS3<br><br>I know how to make it so it only works if they type those, but I want to make it so people can't type more stupid stuff after the third word PS3/XBox<br><br>confusing?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9778">theice</a> — Fri Mar 14, 2008 3:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-03-14T03:59:10-04:00</updated>

		<published>2008-03-14T03:47:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81727#p81727</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81727#p81727"/>
		<title type="html"><![CDATA[Need Help with Userlist]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81727#p81727"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set consoles [split "xbox ps3"]set difficulties [split "easy medium hard expert"]if {[llength [split $t]] != 2 || [lsearch -exact $consoles [string tolower [lindex [split $t] 0]]] &lt; 0 || [lsearch -exact $difficulties [string tolower [lindex [split $t] 1]]] &lt; 0} {    putserv "NOTICE $n :\002Syntax error:\002 please use (.search console [XBox/PS3] [Guitar/Bass/VoX/Drums] [Easy/Medium/Hard/Expert]) ie \002.search console PS3 VoX Expert\002"} else {    set console [lindex [split $t] 0]    set difficulty [lindex [split $t] 1]    # rest of script goes here}##no-word-wrap#####################################################################################################################################################################</code></pre></div>most of the credit for that code snippet to nml375 (used earlier today in a diff thread)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Fri Mar 14, 2008 3:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[theice]]></name></author>
		<updated>2008-03-14T03:37:07-04:00</updated>

		<published>2008-03-14T03:37:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81726#p81726</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81726#p81726"/>
		<title type="html"><![CDATA[Need Help with Userlist]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81726#p81726"><![CDATA[
$t == $text [said by the user in the channel]<br>im dumb and use shorten var<br><br>in this example its said in channel:<br><br>.search console PS3 <br>or/<br>.search console XBox<br><br>I want it so if someone types:<br>.search console XBox BLAHHHHH<br><br>it gives them the error at the } else { at the bottom instead of allowing that if statement to work.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9778">theice</a> — Fri Mar 14, 2008 3:37 am</p><hr />
]]></content>
	</entry>
	</feed>
