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

	<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>2005-01-14T18:26:29-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Razo]]></name></author>
		<updated>2005-01-14T18:26:29-04:00</updated>

		<published>2005-01-14T18:26:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45397#p45397</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45397#p45397"/>
		<title type="html"><![CDATA[Difficulty with $nick variable]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45397#p45397"><![CDATA[
Many thanks, <br><br>I found out that whenever I kept rehashing my bot, the procs would not clear themselves out.  Therefore, when I checked out .tcl $errorInfo, it kept calling a proc that was not even in pub, just as stdragon said.  It came down to having the incorrect arguments in a proc I wrote with the wrong number or arguments, and I had recently had a userfile change, so that contributed to part of the problem.<br>Thanks again for your time. I appreciate it.<br><br>Razo<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5889">Razo</a> — Fri Jan 14, 2005 6:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2005-01-14T13:19:24-04:00</updated>

		<published>2005-01-14T13:19:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45389#p45389</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45389#p45389"/>
		<title type="html"><![CDATA[Difficulty with $nick variable]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45389#p45389"><![CDATA[
Hey Razo,<br><br>I copied your code into tclsh, and it works fine.. no error about nick.<br><br>Also... in case you didn't know, the proc that eggdrop reports the error happening in is not necessarily where the error happens, it is just the bind that triggered the error.<br><br>To find out a little bit more, make sure you have the .tcl command enabled, and immediately after the error occurs type<br><br>.tcl putlog $errorInfo<br><br>Note the capital I in Info, it won't work otherwise. It will hopefully tell you more precisely where the error happened. Paste the exact output here and it should help us find the problem.<br><br>ps I tried metroid's code too and it worked fine... no difference<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Fri Jan 14, 2005 1:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2005-01-14T07:26:58-04:00</updated>

		<published>2005-01-14T07:26:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45379#p45379</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45379#p45379"/>
		<title type="html"><![CDATA[Difficulty with $nick variable]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45379#p45379"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pub -|- "switch" proc_switchproc proc_switch {nick host hand chan arg} {set arguments [lrange $arg 1 end]set cmd [lindex $arg 0]switch $cmd {      "set" { src:set $nick $host $hand $chan $arguments ;putcmdlog ok }      "control" { src:control $nick $host $hand $chan $arguments ;putcmdlog ok}      "cinfo" { src:chaninfo $nick $host $hand $chan $arguments}      "addchan" { src:addchan $nick $host $hand $chan $arguments }      "delchan" { src:delchan $nick $host $hand $chan $arguments }      "addowner" { src:addowner $nick $host $hand $chan $arguments }      "delowner" { src:delowner $nick $host $hand $chan $arguments }      "addop" { src:addop $nick $host $hand $chan $arguments }      "cycle" { src:cycle $nick $hand $chan }      "myinfo" { src:myinfo $nick $hand $chan }      "die" { src:die $nick $hand $chan $arguments}      "addcoowner" { src:addcoown $nick $host $hand $chan $arguments }      "addpeon" { src:addpeon $nick $host $hand $chan $arguments }      "addvoice" { src:addvoice $nick $host $hand $chan $arguments }      "clvl" { src:clvl $nick $host $hand $chan $arguments }      "glvl" { src:glvl $nick $host $hand $chan $arguments}      "access" { src:access $nick $hand $chan }      "kick" { src:kick $nick $host $hand $chan $arguments }      "ban" { src:ban $nick $host $hand $chan $arguments}      "uba" { src:unbanall $nick $host $hand $chan $arguments }      "users" { src:users $nick $host $hand $chan $arguments }      "override" { src:checkride $nick $hand $chan }      "op" { src:op $nick $host $hand $chan $arguments }      "deop" { src:deop $nick $host $hand $chan $arguments }      "voice" { src:voice $nick $host $hand $chan $arguments }      "v" { src:voice $nick $host $hand $chan $arguments }      "dv" { src:devoice $nick $host $hand $chan $arguments }      "devoice" { src:devoice $nick $host $hand $chan $arguments }      "mode" { src:mode $nick $host $hand $chan $arguments }      "topic" { src:topic $nick $host $hand $chan $arguments }      "help" {src:help $nick $hand $chan $arguments}      "rh" { src:rehash $nick $hand }      "rs" { src:restart $nick $hand }      "new" { src:new $nick $hand }      "addcmd" { src:addcmd $nick $host $hand $chan $cmd $arguments }      "delcmd" { src:delcmd $chan $cmd }      "emote" { src:emote $chan $arguments }      default { putnotice $nick "Invalid command - [lrange $arg 1 end]" }      }} </code></pre></div>Try it<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Fri Jan 14, 2005 7:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-01-14T03:56:22-04:00</updated>

		<published>2005-01-14T03:56:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45372#p45372</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45372#p45372"/>
		<title type="html"><![CDATA[Difficulty with $nick variable]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45372#p45372"><![CDATA[
Why not make it simpler, make 1-2 line procs for each switch?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Fri Jan 14, 2005 3:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Razo]]></name></author>
		<updated>2005-01-13T21:54:27-04:00</updated>

		<published>2005-01-13T21:54:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45361#p45361</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45361#p45361"/>
		<title type="html"><![CDATA[Difficulty with $nick variable]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45361#p45361"><![CDATA[
I have found out that it stops right at the "switch" statement.<br>I'm sure that this is not running to the proc that it is calling, the proc that it is calling does not even exist, so I would expect an error message stating that there is no such procedure.<br><br>The $nick variable is gone outside, and past the switch command. The error message it returns is :<br><blockquote class="uncited"><div> [19:56] Tcl error [proc_switch]: can't read "nick": no such variable </div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5889">Razo</a> — Thu Jan 13, 2005 9:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2005-01-13T21:28:41-04:00</updated>

		<published>2005-01-13T21:28:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45359#p45359</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45359#p45359"/>
		<title type="html"><![CDATA[Difficulty with $nick variable]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45359#p45359"><![CDATA[
What's the error message? Also, are you sure the error is happening in this proc and not one of the ones it calls? Try adding "putlog $nick" in a few places to see 1) how far it gets and 2) exactly when the variable "disappears"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Thu Jan 13, 2005 9:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Razo]]></name></author>
		<updated>2005-01-13T20:16:35-04:00</updated>

		<published>2005-01-13T20:16:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45356#p45356</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45356#p45356"/>
		<title type="html"><![CDATA[Difficulty with $nick variable]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45356#p45356"><![CDATA[
Hello<br><br>I have a script that I have been working on for a while now and I cannot get the script to process $nick in a "switch" command.  The TCL script does not recognize $nick, which in my thoughts, doesn't seem right.<br>This script has worked before, I made a few changes to how the arguments were grouped and it still did not work.  I have even tried setting the nick to [set nick "[lindex $nick 0]" ]. Would anybody have any suggestions?<br>I am using Windrop 1.6.17 with TCL library 8.4<br><br>Here is the the code :<br><div class="codebox"><p>Code: </p><pre><code>bind pub -|- "switch" proc_switchproc proc_switch {nick host hand chan arg} {set arguments [lrange $arg 1 end]set cmd [lindex $arg 0]set nick [lindex $nick 0]switch [lindex $cmd 0] {"set" { src:set $nick $host $hand $chan $arguments ;putcmdlog ok }"control" { src:control $nick $host $hand $chan $arguments ;putcmdlog ok}"cinfo" { src:chaninfo $nick $host $hand $chan $arguments}"addchan" { src:addchan $nick $host $hand $chan $arguments }"delchan" { src:delchan $nick $host $hand $chan $arguments }"addowner" { src:addowner $nick $host $hand $chan $arguments }"delowner" { src:delowner $nick $host $hand $chan $arguments }"addop" { src:addop $nick $host $hand $chan $arguments }"cycle" { src:cycle $nick $hand $chan }"myinfo" { src:myinfo $nick $hand $chan }"die" { src:die $nick $hand $chan $arguments}"addcoowner" { src:addcoown $nick $host $hand $chan $arguments }"addpeon" { src:addpeon $nick $host $hand $chan $arguments }"addvoice" { src:addvoice $nick $host $hand $chan $arguments }"clvl" { src:clvl $nick $host $hand $chan $arguments }"glvl" { src:glvl $nick $host $hand $chan $arguments}"access" { src:access $nick $hand $chan }"kick" { src:kick $nick $host $hand $chan $arguments }"ban" { src:ban $nick $host $hand $chan $arguments}"uba" { src:unbanall $nick $host $hand $chan $arguments }"users" { src:users $nick $host $hand $chan $arguments }"override" { src:checkride $nick $hand $chan }"op" { src:op $nick $host $hand $chan $arguments }"deop" { src:deop $nick $host $hand $chan $arguments }"voice" { src:voice $nick $host $hand $chan $arguments }"v" { src:voice $nick $host $hand $chan $arguments }"dv" { src:devoice $nick $host $hand $chan $arguments }"devoice" { src:devoice $nick $host $hand $chan $arguments }"mode" { src:mode $nick $host $hand $chan $arguments }"topic" { src:topic $nick $host $hand $chan $arguments }"help" {src:help $nick $hand $chan $arguments}"rh" { src:rehash $nick $hand }"rs" { src:restart $nick $hand }"new" { src:new $nick $hand }"addcmd" { src:addcmd $nick $host $hand $chan $cmd $arguments }"delcmd" { src:delcmd $chan $cmd } "emote" { src:emote $chan $arguments }default { putnotice $nick "Invalid command - [lrange $arg 1 end]" }}}</code></pre></div>Thanks for your time.<br>Razo<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5889">Razo</a> — Thu Jan 13, 2005 8:16 pm</p><hr />
]]></content>
	</entry>
	</feed>
