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

	<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>2004-02-26T14:54:20-04:00</updated>

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

		<entry>
		<author><name><![CDATA[arcane]]></name></author>
		<updated>2004-02-26T14:54:20-04:00</updated>

		<published>2004-02-26T14:54:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34018#p34018</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34018#p34018"/>
		<title type="html"><![CDATA[kick cmd not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34018#p34018"><![CDATA[
Hah! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2617">arcane</a> — Thu Feb 26, 2004 2:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2004-02-26T09:04:11-04:00</updated>

		<published>2004-02-26T09:04:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34008#p34008</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34008#p34008"/>
		<title type="html"><![CDATA[kick cmd not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34008#p34008"><![CDATA[
After a night's sleep, I have thought about it more clearly.... Peterre's page confused me into wrongly accusing eggdrop's bind command... Of course it would be a string passed to the last parameter, and 'args' by its very nature converts to a list.... Thus by join'ing it, you would get a string still needing to be split....<br><br>  What else can I say.... My bad...  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Thu Feb 26, 2004 9:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-02-26T08:34:39-04:00</updated>

		<published>2004-02-26T08:34:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34004#p34004</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34004#p34004"/>
		<title type="html"><![CDATA[I think you're wrong.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34004#p34004"><![CDATA[
<blockquote class="uncited"><div>As noted in my previous post to arcane in another thread, if we were speaking of plain old vanilla TCL, you would be right about him using args improperly... However because of the way bind calls procedures, it produces a list of lists in this scenario... so join'ing the list of lists produces a single list.....</div></blockquote>Since when does eggdrop do that? And what exactly do you mean? It's passed to the proc as a string in my 1.6.13 test bot.<blockquote class="uncited"><div>[13:20] (@user) % bind pub n !doit doit; proc doit {n u h c args} {putserv "PRIVMSG $c :[join $args]"}<br>[13:21] (@user) !doit { [<br>[13:21] (@sh) { [</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Thu Feb 26, 2004 8:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2004-02-26T03:01:31-04:00</updated>

		<published>2004-02-26T03:01:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33999#p33999</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33999#p33999"/>
		<title type="html"><![CDATA[kick cmd not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33999#p33999"><![CDATA[
strikelight, I'm not sure what you mean. Are you saying bind passes a list as the last argument, not a string? I'm pretty sure that's wrong!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Thu Feb 26, 2004 3:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2004-02-25T23:36:07-04:00</updated>

		<published>2004-02-25T23:36:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33996#p33996</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33996#p33996"/>
		<title type="html"><![CDATA[kick cmd not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33996#p33996"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>set args [join $args]set target [lindex $args 0]set reason [lrange $args 1 end]</code></pre></div></div></blockquote>Do you have the slightest idea what you're doing? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_surprised.gif" width="15" height="15" alt=":o" title="Surprised">  First you use a special argument name (args - read about it here: <a href="http://tcl.tk/man/tcl8.4/TclCmd/proc.htm" class="postlink">http://tcl.tk/man/tcl8.4/TclCmd/proc.htm</a>) that's not needed for this kind of task (a predefined number of arguments), then you join the list created by it, so you're left with the string that was passed to the proc, and THEN you start using list commands on that string. (not a good idea)<br>How about NOT doing all that? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> </div></blockquote>  As noted in my previous post to arcane in another thread, if we were speaking of plain old vanilla TCL, you would be right about him using args improperly... However because of the way bind calls procedures, it produces a list of lists in this scenario... so join'ing the list of lists produces a single list..... But Again, I don't agree with using this method any more than you do....<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Wed Feb 25, 2004 11:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kazoo]]></name></author>
		<updated>2004-02-25T19:44:46-04:00</updated>

		<published>2004-02-25T19:44:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33989#p33989</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33989#p33989"/>
		<title type="html"><![CDATA[kick cmd not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33989#p33989"><![CDATA[
the users have specific host masks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3356">kazoo</a> — Wed Feb 25, 2004 7:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-02-25T19:38:35-04:00</updated>

		<published>2004-02-25T19:38:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33988#p33988</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33988#p33988"/>
		<title type="html"><![CDATA[kick cmd not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33988#p33988"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>set args [join $args]set target [lindex $args 0]set reason [lrange $args 1 end]</code></pre></div></div></blockquote>Do you have the slightest idea what you're doing? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_surprised.gif" width="15" height="15" alt=":o" title="Surprised">  First you use a special argument name (args - read about it here: <a href="http://tcl.tk/man/tcl8.4/TclCmd/proc.htm" class="postlink">http://tcl.tk/man/tcl8.4/TclCmd/proc.htm</a>) that's not needed for this kind of task (a predefined number of arguments), then you join the list created by it, so you're left with the string that was passed to the proc, and THEN you start using list commands on that string. (not a good idea)<br>How about NOT doing all that? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> <br><blockquote class="uncited"><div>Is this what I should have?<div class="codebox"><p>Code: </p><pre><code>...</code></pre></div></div></blockquote>No..you didn't listen to what Dw2k said about putkick (the only thing he got right) Try something like this (lots of extra bloat added, sorry):<div class="codebox"><p>Code: </p><pre><code>bind pub o|f .kick cmd:kickproc cmd:kick {nick uhost hand chan arg} {  # extract the first word and the remaining ones (if any)  # into separate vars and store the return value from 'scan'  set i [scan $arg "%s %\[^\n\]" victim reason]  # if scan returned something &gt; 0 we know there's a victim...  if {$i&gt;0} {    # checking to see if there's someone by that nick present...    if {[onchan $victim $chan]} {      # did the scan find a reason or do we have to provide a default value?      if {$i!=2} {        set reason "$nick doesn't seem to like you."      }      putkick $chan $victim $reason    } else {      puthelp "NOTICE $nick :$victim is not on $chan"    }  } else {    # no arguments were provided, so we tell the stupid user    # how it should be done ;)    puthelp "NOTICE $nick :Syntax: $::lastbind nick ?reason?"  }}</code></pre></div>This code is not tested, but should at least give you some new ideas <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>You're still left with an authentication problem, though. How do you make sure the people triggering the proc really are who they seem to be?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Feb 25, 2004 7:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kazoo]]></name></author>
		<updated>2004-02-25T19:03:39-04:00</updated>

		<published>2004-02-25T19:03:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33987#p33987</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33987#p33987"/>
		<title type="html"><![CDATA[kick cmd not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33987#p33987"><![CDATA[
Is this what I should have?<br><div class="codebox"><p>Code: </p><pre><code>bind pub o|f .kick cmd:kickproc cmd:kick {nick host hand chan args} {set args [join $args]set target [lindex $args 0]set reason [lrange $args 1 end]putkick "$chan [lindex $arg 1] [lrange $arg 2 end] ($nick)"puthelp "Privmsg $nick :Kicked [lindex $arg 1] from $chan"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3356">kazoo</a> — Wed Feb 25, 2004 7:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kazoo]]></name></author>
		<updated>2004-02-23T19:23:22-04:00</updated>

		<published>2004-02-23T19:23:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33921#p33921</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33921#p33921"/>
		<title type="html"><![CDATA[kick cmd not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33921#p33921"><![CDATA[
Thanks :]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3356">kazoo</a> — Mon Feb 23, 2004 7:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dw2k]]></name></author>
		<updated>2004-02-23T19:06:24-04:00</updated>

		<published>2004-02-23T19:06:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33920#p33920</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33920#p33920"/>
		<title type="html"><![CDATA[kick cmd not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33920#p33920"><![CDATA[
You need the correcy syntax for putkick<br><div class="codebox"><p>Code: </p><pre><code> putkick $chan $target $reason </code></pre></div>and if you replace<br><div class="codebox"><p>Code: </p><pre><code>proc cmd:kick {nick host hand chan text} {</code></pre></div>with<br><div class="codebox"><p>Code: </p><pre><code> proc cmd:kick {nick host hand chan args} { </code></pre></div>and add <div class="codebox"><p>Code: </p><pre><code>set args [join $args]set target [lindex $args 0]set reason [lrange $args 1 end]</code></pre></div>Im sure you can figure the rest out <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2329">Dw2k</a> — Mon Feb 23, 2004 7:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kazoo]]></name></author>
		<updated>2004-02-23T19:00:30-04:00</updated>

		<published>2004-02-23T19:00:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33919#p33919</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33919#p33919"/>
		<title type="html"><![CDATA[kick cmd not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33919#p33919"><![CDATA[
Why doesn't this work?<br><div class="codebox"><p>Code: </p><pre><code>bind pub o|f .kick cmd:kickproc cmd:kick {nick host hand chan text} {putkick "$chan :$text"puthelp "Privmsg $nick :Kicked $text from $chan"}</code></pre></div>I'm using eggdrop1.6.8 btw<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3356">kazoo</a> — Mon Feb 23, 2004 7:00 pm</p><hr />
]]></content>
	</entry>
	</feed>
