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

	<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-09-17T04:46:54-04:00</updated>

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

		<entry>
		<author><name><![CDATA[egghead]]></name></author>
		<updated>2004-09-17T04:46:54-04:00</updated>

		<published>2004-09-17T04:46:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40976#p40976</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40976#p40976"/>
		<title type="html"><![CDATA[invalid command name]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40976#p40976"><![CDATA[
The problem can be in one of the procedures out_world_event , out_player_kill  etc. etc.<br><br>Add putlog statements to these procs and see in what procedure and at which point in the procedure the error occurs.<br><br>Based on what you have posted it is difficult to locate the source of the error.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=282">egghead</a> — Fri Sep 17, 2004 4:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-09-16T22:47:52-04:00</updated>

		<published>2004-09-16T22:47:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40974#p40974</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40974#p40974"/>
		<title type="html"><![CDATA[invalid command name]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40974#p40974"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>listen **** script listen_initset reportchan "#matchbot-priv"proc listen_init {idx} {    global reportchan    # Client Connect    putdcc $idx "connected"    putquick "PRIVMSG $reportchan :Steamer Connected! Match Relay Enabled."    control $idx listen_controller}</code></pre></div>This is the code where the listen_controller is binded to the listen socket. Just a control statement, so the text that is given to the proc is formatted by eggdrop.<br><br>xAvia<p>Statistics: Posted by Guest — Thu Sep 16, 2004 10:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-09-16T21:57:33-04:00</updated>

		<published>2004-09-16T21:57:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40973#p40973</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40973#p40973"/>
		<title type="html"><![CDATA[invalid command name]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40973#p40973"><![CDATA[
Hi,<br><br><br>I never really figured out why it was doing the 'invalid command name' before, but I made a workaround, and it was working again. Now I am getting the same error but with a different variable. This is getting annoying and I am pretty close to just making a simple perl irc bot instead of eggdrop. But I will give it one more try if someone could please give me some assistance and either tell me what I am doing wrong, or point me in the right direction.<br><br>Error: Tcl error [listen_controller]: invalid command name "12"<br><br>12 is just a number, or at least is should be only a number. <br><br>This only happens when I am trying to call a proc, not when I just manipulating the string. It looks fine when I output it, so I don't know why TCL is trying to make it something it isn't.<br><br>[20:55] cmd: player_kill args: "[DZ]-axel &lt;3 meg the angel" 18 "STEAM_0:1:422302 T 12 0" "(f)-DS" 21 "STEAM_0:0:73139 CT 8 1" "ak47"<br><br>Is there something I am doing wrong, or maybe a better way to formatt my messages to the eggdrop to make this problem never happen?<br><div class="codebox"><p>Code: </p><pre><code>proc listen_controller {idx input} {    global reportchan    # We will be quiet until we recieve a valid login string    if {$input == ""} {        # Client Disconnect        putquick "PRIVMSG $reportchan :Streamer Disconnected! Match Relay Disabled."        return 1    }    set cmd [lindex [split $input] 0]    set arg [join [lrange [split $input] 1 end]]    putlog "cmd: $cmd args: $arg"    if {[regexp {^say\s(.+)$} $input match text]} {        putquick "PRIVMSG #matchbot-priv :$text"    } elseif {[string equal $cmd world_event]} {        out_world_event $arg    } elseif {[string equal $cmd player_kill]} {        out_player_kill $arg    } elseif {[string equal $cmd player_join]} {        out_player_join $arg    } elseif {[string equal $cmd player_connect]} {        out_player_connect $arg    } elseif {[string equal $cmd player_validate]} {        out_player_validate $arg    } elseif {[string equal $cmd player_enter]} {        out_player_enter $arg    } elseif {[string equal $cmd player_disconnect]} {        out_player_disconnect $arg    } elseif {[string equal $cmd player_event]} {        out_player_event $arg    } elseif {[string equal $cmd team_event]} {        out_team_event $arg    }}</code></pre></div>That is the proc the error happens in. Also if it makes any difference, I am using the 'listen &lt;port&gt; script &lt;proc&gt;' command, which receives commands from a perl daemon.<br><br>xAvia<p>Statistics: Posted by Guest — Thu Sep 16, 2004 9:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-09-11T06:57:36-04:00</updated>

		<published>2004-09-11T06:57:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40834#p40834</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40834#p40834"/>
		<title type="html"><![CDATA[invalid command name]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40834#p40834"><![CDATA[
Check whatever is sending the data to the bot to make sure it's not sending it encased in []s. IE: [STEAM_0:1:2128306].<p>Statistics: Posted by Guest — Sat Sep 11, 2004 6:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-09-08T20:23:47-04:00</updated>

		<published>2004-09-08T20:23:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40724#p40724</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40724#p40724"/>
		<title type="html"><![CDATA[invalid command name]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40724#p40724"><![CDATA[
Hello,<br><br>I am working on a TCL script that receives commands from an external script with use of the 'listen &lt;port&gt; script &lt;proc&gt;'. My problem doesn't really have to do with that, but it's good to have background information.<br><br>My problem is: Tcl error [listen:controller]: invalid command name "STEAM_0:1:2128306"<br><br>STEAM_0:1:2128306 is NOT a command, it shouldn't be one, it is just data being passed to a proc from another proc.<br><br>The code below is the proc where the error occurs, and the $steam variable (where STEAM_0:1:2128306 would be stored) is only used once in the last elseif.<br><div class="codebox"><p>Code: </p><pre><code>proc listen:controller {idx input} {    # We will be quiet until we recieve a valid login string    if {$input == ""} {        # Client Disconnect        return 1    }    if {[regexp {^say\s(.+)$} $input match text]} {        putquick "PRIVMSG # :$text"    } elseif {[regexp {^world_event\s"([^"]+)"$} $input match event]} {        out:world_event $event    } elseif {[regexp {^player_kill\s"([^"]+)"\s(CT|T)\s"([^"]+)"\s(CT|T)\s"([^"]+)"$} $input match plyr1 team1 plyr2 team2 w$        out:player_kill $plyr1 $team1 $plyr2 $team2 $weapon    } elseif {[regexp {^player_connect\s"([^"]+)"\s(\d+)\s(\S+)\s(CT|T)$} $input match name id steam team]} {        out:player_connect $name $id $steam $team    }}</code></pre></div>I don't quite understand why TCL is thinking STEAM_0:1:2128306 would be a command, so I am really stuck. Any help would be appreciated.<br><br>Also I am curious if anyone has comments on my use of regexp. Is it a good idea to use it like that, or is there a better more efficient way to accomplish the same thing in TCL?<br><br>Matt<p>Statistics: Posted by Guest — Wed Sep 08, 2004 8:23 pm</p><hr />
]]></content>
	</entry>
	</feed>
