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

	<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>2001-09-29T00:38:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-09-29T00:38:00-04:00</updated>

		<published>2001-09-29T00:38:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=123#p123</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=123#p123"/>
		<title type="html"><![CDATA[Ignore [function] has being a function]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=123#p123"><![CDATA[
The code works... your code works. Thank you. Now I will pass my eyes on the tcl manual to understand the changes. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":smile:" title="Smile"><br><p>Statistics: Posted by Guest — Sat Sep 29, 2001 12:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Petersen]]></name></author>
		<updated>2001-09-28T22:53:00-04:00</updated>

		<published>2001-09-28T22:53:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=120#p120</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=120#p120"/>
		<title type="html"><![CDATA[Ignore [function] has being a function]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=120#p120"><![CDATA[
your problem is that you're using list functions on strings. try this<br><div class="codebox"><p>Code: </p><pre><code> # syntax: !kb &lt;nick&gt; [reason] bind pub o|o !kb pub:kickban proc cbot {nick chan tnick} { if {[botisop $chan]} { if {[onchan $tnick $chan]} { return 1 } else { puthelp "NOTICE $nick :no such nick on channel!" ; return 0 } } else { puthelp "NOTICE $nick :i dont have ops!" ; return 0 } } proc pub:kickban {nick uhost hand chan text} { set tnick [lindex [split $text] 0] if {[cbot $nick $chan $tnick]} { if {[lindex [split $text] 1] != ""} { set reason [join [lrange [split $text] 1 end]] } else { set reason banned } newchanban $chan *!*@[lindex [split [getchanhost $tnick $chan] @] 1] $nick $reason 10 utimer 5 [list putkick $chan $tnick $reason] } } </code></pre></div>note that this is untested code<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=60">Petersen</a> — Fri Sep 28, 2001 10:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-09-28T22:19:00-04:00</updated>

		<published>2001-09-28T22:19:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=119#p119</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=119#p119"/>
		<title type="html"><![CDATA[Ignore [function] has being a function]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=119#p119"><![CDATA[
# syntax: !kb &lt;nick&gt; [reason]<br><br>bind pub o|o !kb pub:kickban<br><br>proc cbot {nick chan tnick} {<br>  if {[botisop $chan]} {<br>    if {[onchan $tnick $chan]} {<br>      return 1<br>    } else { puthelp "NOTICE $nick :no such nick on channel!" ; return 0 }<br>  } else { puthelp "NOTICE $nick :i dont have ops!" ; return 0 }<br>}<br><br>proc pub:kickban {nick uhost hand chan text} {<br>  set tnick [lindex $text 0]<br>  if {[cbot $nick $chan $tnick]} {<br>    if {[lindex $text 1] != ""} { set reason [lrange $text 1 end] } else { set reason banned }<br>    newchanban $chan *!*@[lindex [split [getchanhost $tnick $chan] @] 1] $nick $reason 10<br>    utimer 5 "putkick [$chan $tnick $reason]"<br>  }<br>}<br><br>---<br><br>I'm almost sure that my problem is in utimer 5 "putkick [$chan $tnick $reason]"<p>Statistics: Posted by Guest — Fri Sep 28, 2001 10:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Petersen]]></name></author>
		<updated>2001-09-28T22:09:00-04:00</updated>

		<published>2001-09-28T22:09:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=117#p117</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=117#p117"/>
		<title type="html"><![CDATA[Ignore [function] has being a function]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=117#p117"><![CDATA[
Its all to do with how you handle strings in the script. Paste the code and we'll tell you what you've done wrong.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=60">Petersen</a> — Fri Sep 28, 2001 10:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-09-28T21:34:00-04:00</updated>

		<published>2001-09-28T21:34:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=116#p116</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=116#p116"/>
		<title type="html"><![CDATA[Ignore [function] has being a function]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=116#p116"><![CDATA[
I started to script my tcls for a time but yet i have a problem that i couldn't resolve for myself. In my !kickban command, if a target nick is in the form of [justanick], the script thinks that 'justanick' is a function and of course gives an error because no such function exists. Can I pass literal arguments to a putkick command (or every other command) bypassing the [] and make the kick ? I read somewhere that backslash[backslash cound be the solution, but how can I make the tcl interpreter assume that [nick] is a nick and not a function ?! Thanks in advance<br><br>_________________<br>Best regards, Marco Ferra<br><br>&lt;font size=-1&gt;[ This Message was edited by: oldfield on 2001-09-28 19:36 ]&lt;/font&gt;<br><br>&lt;font size=-1&gt;[ This Message was edited by: oldfield on 2001-09-28 19:36 ]&lt;/font&gt;<p>Statistics: Posted by Guest — Fri Sep 28, 2001 9:34 pm</p><hr />
]]></content>
	</entry>
	</feed>
