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

	<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>2002-12-16T06:49:45-04:00</updated>

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

		<entry>
		<author><name><![CDATA[tainted]]></name></author>
		<updated>2002-12-16T06:49:45-04:00</updated>

		<published>2002-12-16T06:49:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14304#p14304</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14304#p14304"/>
		<title type="html"><![CDATA[Is this correct?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14304#p14304"><![CDATA[
Sorry!  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> I was just in one of them moods..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1256">tainted</a> — Mon Dec 16, 2002 6:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-12-16T06:28:32-04:00</updated>

		<published>2002-12-16T06:28:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14303#p14303</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14303#p14303"/>
		<title type="html"><![CDATA[Is this correct?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14303#p14303"><![CDATA[
LOL - COme on, poor bloke must be getting excited, when you know it doesn't <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>This is a pretty good first attempt at a script, however, there are a few issues that should be addressed.<br><br>First off, you are using the variable $reason, to specify a reason for the kick. The major issue here is, you havn't defined the variable reason, and as such, it doesn't exist.<br><br>Second, the way you named your variables. You usage is correct, but for simplicity, you should name tham better. Once you start on scripts that involve 20 lines upwards, youw ill start to get confused, as to what contains what. Using variables like $nick, show what it is supposed to contain.<br><br>Third. This isn't your fault, it's just part of the learning cycle. When using the [lindex] command, Tcl is expecting a "Tcl encoded" list, as it's argument.<br><br>In a nutshell, a list, is a string of data, than can contain one or more, items, that can be of pretty much any length. Where in your script, you want to pick 1 item of many (EG, you only what the channel, or only the nickname), Tcl lists can contain multiwork aguments. (EG, index 0 could be "hello" and index 2 could be "hello to all").<br><br>In your script, you are using the rest of the text sent to the bot. This is exactly what it is, a string, and not a list.<br><br>Tcl provides 2 commands, that can convert to and from a list. IE, a string to a list, and list to a string. These are what you can use, to correctly provide the lindex command with what it needs.<br><br>The split command (the one you want) will convert the text into a list, and join command, will convert it the otherway.<br><br>Failure to do this, will not produce any noticable results in most usage, however, once you start trying to kick nicknames like "[clan]onetwo", it will start spitting errors.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Mon Dec 16, 2002 6:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tainted]]></name></author>
		<updated>2002-12-16T02:14:24-04:00</updated>

		<published>2002-12-16T02:14:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14298#p14298</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14298#p14298"/>
		<title type="html"><![CDATA[Is this correct?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14298#p14298"><![CDATA[
Does it work?  <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=1256">tainted</a> — Mon Dec 16, 2002 2:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-12-16T00:51:10-04:00</updated>

		<published>2002-12-16T00:51:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14295#p14295</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14295#p14295"/>
		<title type="html"><![CDATA[Is this correct?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14295#p14295"><![CDATA[
bind msg f kick do_kick<br><br>proc do_kick {n u h t} {<br>  set targ [lindex $t 1]<br>  set chan [lindex $t 0]<br>   putkick $chan $targ $reason<br>}<br><br>is this tcl correct for /msg bot kick &lt;channel&gt; &lt;nick&gt; &lt;reason&gt;?<p>Statistics: Posted by Guest — Mon Dec 16, 2002 12:51 am</p><hr />
]]></content>
	</entry>
	</feed>
