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

	<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>2003-01-23T21:11:18-04:00</updated>

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

		<entry>
		<author><name><![CDATA[SmokeyOne]]></name></author>
		<updated>2003-01-23T21:11:18-04:00</updated>

		<published>2003-01-23T21:11:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15735#p15735</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15735#p15735"/>
		<title type="html"><![CDATA[pub commands +sub comamnds !!!!HELP!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15735#p15735"><![CDATA[
basicly the jest behind it is, the net(trig) is set to !net blah1 !net blah2.  This is for writeing to a database for like servers opers and stuff like that.  I am going to bind it to n|n which would make the commands more secure.  I'ts kinda like a services bot, now the problem I'm haveing is trying to get local users on a server to pint out.. I'm messing it up somewhere, I'm useing<br><br>bind raw 265 but I guess I'm setting it up wrong =/<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2530">SmokeyOne</a> — Thu Jan 23, 2003 9:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-01-23T09:49:45-04:00</updated>

		<published>2003-01-23T09:49:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15705#p15705</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15705#p15705"/>
		<title type="html"><![CDATA[pub commands +sub comamnds !!!!HELP!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15705#p15705"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pub - $net(trig) net_command proc net_command {nick host hand chan arg} { global netset subword [lindex [split $arg] 0] if {$subword == "adduserr"} { putmsg $chan "testing addserver command" return 0 } if {$subword == "deluser"} { putmsg $chan "testing delserver command" return 0 } } </code></pre></div>this is how he meant it.. but I have to say.. beats me why you are using net as an array and why it's global... I hope you are using it to some other means... cause if not it's 100% not needed<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Thu Jan 23, 2003 9:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SmokeyOne]]></name></author>
		<updated>2003-01-23T07:52:32-04:00</updated>

		<published>2003-01-23T07:52:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15703#p15703</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15703#p15703"/>
		<title type="html"><![CDATA[pub commands +sub comamnds !!!!HELP!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15703#p15703"><![CDATA[
okay so much for that idea......<br><br><br>okay its clear now. I have absoultly no idea on how to phrase this statment..... shot me now<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2530">SmokeyOne</a> — Thu Jan 23, 2003 7:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-01-23T07:45:03-04:00</updated>

		<published>2003-01-23T07:45:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15702#p15702</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15702#p15702"/>
		<title type="html"><![CDATA[pub commands +sub comamnds !!!!HELP!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15702#p15702"><![CDATA[
That would simply mean, "run this, if there isn't a space, at the begining of the text sent"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Thu Jan 23, 2003 7:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SmokeyOne]]></name></author>
		<updated>2003-01-23T07:43:47-04:00</updated>

		<published>2003-01-23T07:43:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15701#p15701</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15701#p15701"/>
		<title type="html"><![CDATA[pub commands +sub comamnds !!!!HELP!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15701#p15701"><![CDATA[
I'm woundering though, cause this going to borther me untill i figure it out.<br><br>if i do this in the if statment<br><br>if {[lindex $args 0] != "" }<br><br>would that make any difference ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2530">SmokeyOne</a> — Thu Jan 23, 2003 7:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SmokeyOne]]></name></author>
		<updated>2003-01-23T07:23:10-04:00</updated>

		<published>2003-01-23T07:23:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15698#p15698</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15698#p15698"/>
		<title type="html"><![CDATA[pub commands +sub comamnds !!!!HELP!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15698#p15698"><![CDATA[
okay so i need to do one of 2 things, 1. slap myself awake cause I've been at this all night, and 2. once i set the $arg == "addserver" i need to catch the text after that <br> use [lindex [split $arg] 0] i see where your getting at there. I'm not very good with arrays =/ as you can see i suck at them.  <br><br>I would need to set the text grabed at the end of the command and have that write to a file or in this case trying to test the code by useing putmsg $chan "blah", now if I can just get this maybe I can get all 10 commands I want to use with just "!net blah" or i can stop all this and bind each one to its own littlle proc.. which "imo" would make the code annoying to look at.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2530">SmokeyOne</a> — Thu Jan 23, 2003 7:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-01-23T07:10:51-04:00</updated>

		<published>2003-01-23T07:10:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15696#p15696</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15696#p15696"/>
		<title type="html"><![CDATA[pub commands +sub comamnds !!!!HELP!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15696#p15696"><![CDATA[
Nothing of the sort. The code above, wouldn't even look write in any sort of language.<br><br>Taking you original code that you posted.<br><br>See point one of my previous post. You are using "global net(trig)". This is incorrect, and will cause error. You can't import specific array elements, and must import he whole array using "global net".<br><br>In your script you use "if {$arg == adduser} {". This is wrong.<br><br>$arg contain the whole line, as typed, wihtout the first word.<br><br>If i typed "!trigger addserver hello.to.all", the $arg is set to "addserver hello.to.all"<br><br>"addserver" and "addserver hello.to.all" are not equal. This means thew IF fails.<br><br>Thus, you need to obtain only the first word from what I typed.<br><br>using the small segment of code in my previous reply will do this for you.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Thu Jan 23, 2003 7:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SmokeyOne]]></name></author>
		<updated>2003-01-23T06:57:36-04:00</updated>

		<published>2003-01-23T06:57:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15695#p15695</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15695#p15695"/>
		<title type="html"><![CDATA[hummm]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15695#p15695"><![CDATA[
so something like this ( i think )<br><br>bind pub - $net(trig) net_command<br><br>proc net_command {nick host hand chan arg} {<br>        global net(trig)<br>        if {$arg == "addserver"} {<br>                putmsg $chan "testing addserver command"<br>                return 0<br>proc net_command {nick host hand chan arg} {<br>        global botnick<br>        if {$arg = $net{trig} 0}<br>        set "" [lindex [split $arg] 0]<br>        putmsg $chan "testing command now"<br><br>I think this is what your ment.... somewhat<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2530">SmokeyOne</a> — Thu Jan 23, 2003 6:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-01-23T06:38:58-04:00</updated>

		<published>2003-01-23T06:38:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15692#p15692</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15692#p15692"/>
		<title type="html"><![CDATA[pub commands +sub comamnds !!!!HELP!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15692#p15692"><![CDATA[
You are along the right lines.<br><br>Point one. You can't make an array global like that "net(trig)". Simply import "net" and you can usee all components within that array.<br><br>Second. You script would work fine, if all you are typing is "!net adduser" and nothing more.<br><br>Anything more or less, and it will not work. This is due to the "==" in your if statments. IE, anything more or less, isn't equal too.<br><br>TO get around this, you need to extract the first work only, thus, you can have any number of words.<br><br>To do this, you can use somthing like<br><div class="codebox"><p>Code: </p><pre><code>set subword [lindex [split $arg] 0]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Thu Jan 23, 2003 6:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SmokeyOne]]></name></author>
		<updated>2003-01-23T06:28:57-04:00</updated>

		<published>2003-01-23T06:28:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15691#p15691</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15691#p15691"/>
		<title type="html"><![CDATA[pub commands +sub comamnds !!!!HELP!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15691#p15691"><![CDATA[
okay I'm not sure if this has been done, but what I'm trying to do is use lets say "!net" as the command trigger then useing sub's like "!net adduser" but trying to defind it under one proc. this is what I thought would work:<br><br>bind pub - $net(trig) net_command<br><br>proc net_command {nick host hand chan arg} {<br>        global net(trig)<br><br>        if {$arg == "adduserr"} {<br>                putmsg $chan "testing addserver command"<br>                return 0<br>        }<br><br>        if {$arg == "deluser"} {<br>                putmsg $chan "testing delserver command"<br>                return 0<br>        }<br>}<br>I'm not sure on what to do here, any help would be cool....<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2530">SmokeyOne</a> — Thu Jan 23, 2003 6:28 am</p><hr />
]]></content>
	</entry>
	</feed>
