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

	<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>2010-07-10T02:01:58-04:00</updated>

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

		<entry>
		<author><name><![CDATA[username]]></name></author>
		<updated>2010-07-10T02:01:58-04:00</updated>

		<published>2010-07-10T02:01:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93500#p93500</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93500#p93500"/>
		<title type="html"><![CDATA[userlist to msg [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93500#p93500"><![CDATA[
Oh, sorry about chan in msg bind. It was my "epic fail".<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6813">username</a> — Sat Jul 10, 2010 2:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cache]]></name></author>
		<updated>2010-07-09T07:49:31-04:00</updated>

		<published>2010-07-09T07:49:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93494#p93494</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93494#p93494"/>
		<title type="html"><![CDATA[userlist to msg [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93494#p93494"><![CDATA[
<blockquote class="uncited"><div>This one, if you don't put a channel, it will use the hardcoded variable chan_for_this as your channel. This fixes the bracket issue as well. This should work for ya <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"></div></blockquote>Thank you, it helps  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> I guess it isn't possible to make $chan work in pm w/o having to hardcode the channel in, so I assume only commands in open room know what the roomname is but pm don't.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7220">cache</a> — Fri Jul 09, 2010 7:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2010-07-09T05:08:01-04:00</updated>

		<published>2010-07-09T05:08:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93492#p93492</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93492#p93492"/>
		<title type="html"><![CDATA[userlist to msg [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93492#p93492"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>variable nicks_per_line 5variable chan_for_this #mychanbind msg f|f !userlist msg:userlistproc msg:userlist {nick uhost hand text} {  if {![string length [set chan [lindex [split $text] 0]]]} {    set chan $::chan_for_this  }  if {![validchan $chan]} {    putserv "PRIVMSG $nick :$chan is not valid."  } elseif {![botonchan $chan]} {    putserv "PRIVMSG $nick :I am not on $chan."  } elseif {![string length [userlist | $chan]} {    putserv "PRIVMSG $nick :The userlist for $chan is empty."  } else {    foreach user [userlist | $chan] {      lappend spam $user      if {[llength $spam] &gt;= $::nicks_per_line} {        putserv "PRIVMSG $nick :[join $spam ", "]."        unset spam      }    }    if {[info exists spam]} {      putserv "PRIVMSG $nick :[join $spam ", "]."    }    putserv "End of userlist."  }}</code></pre></div>This one, if you don't put a channel, it will use the hardcoded variable chan_for_this as your channel. This fixes the bracket issue as well. This should work for ya <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Fri Jul 09, 2010 5:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cache]]></name></author>
		<updated>2010-07-08T18:25:14-04:00</updated>

		<published>2010-07-08T18:25:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93487#p93487</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93487#p93487"/>
		<title type="html"><![CDATA[userlist to msg [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93487#p93487"><![CDATA[
Thank you, I do get an error that a close bracket is missing,trying to figure out where it goes lol.... so no way to have it without having to use #mychan?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7220">cache</a> — Thu Jul 08, 2010 6:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2010-07-08T16:59:59-04:00</updated>

		<published>2010-07-08T16:59:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93486#p93486</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93486#p93486"/>
		<title type="html"><![CDATA[userlist to msg [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93486#p93486"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>variable nicks_per_line 5bind msg f|f !userlist msg:userlistproc msg:userlist {nick uhost hand text} {  set chan [lindex [split $text] 0]  if {![validchan $chan]} {    putserv "PRIVMSG $nick :$chan is not valid."  } elseif {![botison $chan]} {    putserv "PRIVMSG $nick :I am not on $chan."  } elseif {![string length [userlist | $chan]} {    putserv "PRIVMSG $nick :The userlist for $chan is empty."  } else {    foreach user [userlist | $chan] {      lappend spam $user      if {[llength $spam] &gt;= $::nicks_per_line} {        putserv "PRIVMSG $nick :[join $spam ", "]."        unset spam      }    }    if {[info exists spam]} {      putserv "PRIVMSG $nick :[join $spam ", "]."    }    putserv "End of userlist."  }}</code></pre></div>Maybe smth like this? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br>&lt;nick&gt; !userlist #mychan<br>&lt;bot&gt; *insert spam here*<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Thu Jul 08, 2010 4:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2010-07-08T16:40:35-04:00</updated>

		<published>2010-07-08T16:40:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93485#p93485</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93485#p93485"/>
		<title type="html"><![CDATA[userlist to msg [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93485#p93485"><![CDATA[
<blockquote class="uncited"><div>You need to read about binds here: <a href="http://www.eggheads.org/support/egghtml/1.6.20/tcl-commands.html#binda" class="postlink">http://www.eggheads.org/support/egghtml ... html#binda</a><br>In bind msg there is no chan. </div></blockquote>So, your proc must be:<div class="codebox"><p>Code: </p><pre><code>proc msg:userlist {nick uhost hand text} { </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Thu Jul 08, 2010 4:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cache]]></name></author>
		<updated>2010-07-08T16:13:47-04:00</updated>

		<published>2010-07-08T16:13:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93484#p93484</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93484#p93484"/>
		<title type="html"><![CDATA[userlist to msg [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93484#p93484"><![CDATA[
Tried that but still get error Tcl error [msg:userlist]: wrong # args: should be "msg:userlist nick uhost hand chan text"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7220">cache</a> — Thu Jul 08, 2010 4:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[username]]></name></author>
		<updated>2010-07-08T15:36:14-04:00</updated>

		<published>2010-07-08T15:36:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93482#p93482</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93482#p93482"/>
		<title type="html"><![CDATA[userlist to msg [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93482#p93482"><![CDATA[
You need to read about binds here: <a href="http://www.eggheads.org/support/egghtml/1.6.20/tcl-commands.html#binda" class="postlink">http://www.eggheads.org/support/egghtml ... html#binda</a><br>In bind msg there is no chan. <br>And you need not use <div class="codebox"><p>Code: </p><pre><code>set tmp ""</code></pre></div> before <div class="codebox"><p>Code: </p><pre><code>lappend tmp $user</code></pre></div>, because you can use <a href="http://www.tcl.tk/man/tcl8.5/TclCmd/lappend.htm" class="postlink">lappend</a> for non exists variable and this variable will be created. You post very strange code. Try it: <div class="codebox"><p>Code: </p><pre><code>bind msg f|f !userlist msg:userlistproc msg:userlist {nick uhost hand chan text} {    if {[userlist $chan] == ""} {        putserv "PRIVMSG $nick :Userlist empty for $chan."    } else {    foreach user [userlist $chan] {        lappend tmp $user    }    putserv "PRIVMSG $nick :[join $tmp ", "]."    putserv "End of userlist."  }} </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6813">username</a> — Thu Jul 08, 2010 3:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cache]]></name></author>
		<updated>2010-07-09T07:50:11-04:00</updated>

		<published>2010-07-08T15:06:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93481#p93481</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93481#p93481"/>
		<title type="html"><![CDATA[userlist to msg [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93481#p93481"><![CDATA[
Trying to get this command to work in pm, what am I doing wrong with the proc?? log file just keeps saying should be {nick uhost hand chan text}, can someone please show me correct way? Thanks<br><br><div class="codebox"><p>Code: </p><pre><code>bind msg f|f !userlist msg:userlist proc msg:userlist {nick uhost hand chan text} {   if {[userlist | $chan] == ""} {     putserv "PRIVMSG $nick :Userlist empty for $chan."   } else {     set tmp ""     foreach user [userlist | $chan] {       lappend tmp $user       if {[llength $tmp] == "6"} {         putserv "PRIVMSG $nick :[join $tmp ", "]."         set tmp ""       }     }     if {[llength $tmp] != "6"} {       putserv "PRIVMSG $nick :[join $tmp ", "]."       set tmp ""     }     putserv "End of userlist."   } }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7220">cache</a> — Thu Jul 08, 2010 3:06 pm</p><hr />
]]></content>
	</entry>
	</feed>
