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

	<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-11-11T07:15:04-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Weirdo]]></name></author>
		<updated>2002-11-11T07:15:04-04:00</updated>

		<published>2002-11-11T07:15:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=13041#p13041</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=13041#p13041"/>
		<title type="html"><![CDATA[Simple little query - binds formatting]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=13041#p13041"><![CDATA[
Well mirc has the lazy bastard feel to a lot of its commands. I could understand it might save a little time, would have thought the easiest way of saving time would have been making the syntax shorter or whatnot. <br><br>Meh, at least i know what its doing. Time to make lots of totally different commands to confuse this autocompleter <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1195">Weirdo</a> — Mon Nov 11, 2002 7:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2002-11-10T19:56:30-04:00</updated>

		<published>2002-11-10T19:56:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=13015#p13015</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=13015#p13015"/>
		<title type="html"><![CDATA[Simple little query - binds formatting]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=13015#p13015"><![CDATA[
<blockquote class="uncited"><div>So, why , whoever it was that added this particular feature/bug/whatever into the eggdrop core, was this implemented? What does it really achieve anyways?</div></blockquote>As already mentioned, it can be useful.. Much like scripts built for irc clients that do auto-nick completion when you only type part of someone's nick... It can save you time (albeit not much) and energy from having<br>to type the entire command out.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sun Nov 10, 2002 7:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Weirdo]]></name></author>
		<updated>2002-11-10T19:22:15-04:00</updated>

		<published>2002-11-10T19:22:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=13010#p13010</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=13010#p13010"/>
		<title type="html"><![CDATA[Simple little query - binds formatting]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=13010#p13010"><![CDATA[
It does work indeedy <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>So, why , whoever it was that added this particular feature/bug/whatever into the eggdrop core, was this implemented? What does it really achieve anyways?<br><br>stdragon's approach tends to work the fastest on the bot. Will have a go at using his <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1195">Weirdo</a> — Sun Nov 10, 2002 7:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2002-11-10T19:15:15-04:00</updated>

		<published>2002-11-10T19:15:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=13009#p13009</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=13009#p13009"/>
		<title type="html"><![CDATA[Simple little query - binds formatting]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=13009#p13009"><![CDATA[
<blockquote class="uncited"><div>How about a combo approach?<br><br>Use a filt bind to store the actual command as typed by the user. Have it set a global variable "actual_command".<br><br>Then in your proc, look at the value of 'actual_command' and if it's not "testchan" then return without doing anything.<br><div class="codebox"><p>Code: </p><pre><code>bind filt - ".t*" testchan_filtproc testchan_filt {idx text} {  global actual_command  set actual_command [lindex [split $text] 0]  return $text}proc dcc n testchan testchan_dccproc testchan_dcc {hand idx text} {  global actual_command  if {[string compare -nocase $actual_command ".testchan"]} {return 0}  ...}</code></pre></div></div></blockquote>Yea, that'd work.. good solution!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sun Nov 10, 2002 7:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-11-10T15:48:47-04:00</updated>

		<published>2002-11-10T15:48:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=13002#p13002</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=13002#p13002"/>
		<title type="html"><![CDATA[Simple little query - binds formatting]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=13002#p13002"><![CDATA[
How about a combo approach?<br><br>Use a filt bind to store the actual command as typed by the user. Have it set a global variable "actual_command".<br><br>Then in your proc, look at the value of 'actual_command' and if it's not "testchan" then return without doing anything.<br><div class="codebox"><p>Code: </p><pre><code>bind filt - ".t*" testchan_filtproc testchan_filt {idx text} {  global actual_command  set actual_command [lindex [split $text] 0]  return $text}proc dcc n testchan testchan_dccproc testchan_dcc {hand idx text} {  global actual_command  if {[string compare -nocase $actual_command ".testchan"]} {return 0}  ...}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Sun Nov 10, 2002 3:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2002-11-10T14:30:52-04:00</updated>

		<published>2002-11-10T14:30:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12998#p12998</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12998#p12998"/>
		<title type="html"><![CDATA[Simple little query - binds formatting]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12998#p12998"><![CDATA[
<blockquote class="uncited"><div>This does have it's added advantages, however, you can disable this inside one proc, without haveing to use the filt proc.<br><br>There is a global variable called $lastbind, which you can use to see how the command was called.<br><br>This will allow a single procedure, to act for multiple commands. In any help information, you can use it, to output the command name used, rather than a fixed one.<br><br>See more information in tcl-commands.doc</div></blockquote>Ofcourse, for this to work, you would still need multiple bindings, such as:<br><div class="codebox"><p>Code: </p><pre><code>bind dcc n te proc_to_callbind dcc n tes proc_to_call...bind dcc n testcha proc_to_callbind dcc n testchan proc_to_call</code></pre></div>Otherwise, $lastbind would contain the value of the nearest-matched command of course. (ie. doing .testc [without the additional bindings in place] will set lastbind to "testchan")<br><br>This method itself alone is very inefficient as stated before,<br>not to mention that it too will have problems if there are other commands<br>that start with "te", etc.. which would have to be dealt with some how as well.. You may have 2 procedures using filt, but less lines taken by excessive bindings if you were to utilize $lastbind... Overall, you'd save time and space by filt'ing, if you really must worry about it at all.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sun Nov 10, 2002 2:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-11-10T10:01:24-04:00</updated>

		<published>2002-11-10T10:01:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12989#p12989</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12989#p12989"/>
		<title type="html"><![CDATA[Simple little query - binds formatting]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12989#p12989"><![CDATA[
This does have it's added advantages, however, you can disable this inside one proc, without haveing to use the filt proc.<br><br>There is a global variable called $lastbind, which you can use to see how the command was called.<br><br>This will allow a single procedure, to act for multiple commands. In any help information, you can use it, to output the command name used, rather than a fixed one.<br><br>See more information in tcl-commands.doc<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Sun Nov 10, 2002 10:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Weirdo]]></name></author>
		<updated>2002-11-10T05:04:48-04:00</updated>

		<published>2002-11-10T05:04:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12983#p12983</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12983#p12983"/>
		<title type="html"><![CDATA[Simple little query - binds formatting]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12983#p12983"><![CDATA[
Right, so thats what it does. Thankies <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1195">Weirdo</a> — Sun Nov 10, 2002 5:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2002-11-10T00:15:06-04:00</updated>

		<published>2002-11-10T00:15:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12978#p12978</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12978#p12978"/>
		<title type="html"><![CDATA[Re: Simple little query - binds formatting]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12978#p12978"><![CDATA[
Eggdrop auto-completes text for dcc commands to find the nearest matching command... (ie. if you do .bott , it will show you the output for .bottree).  There isn't much you can do about this, other than possibly <br>making additional binds for all possible incomplete commands, which isn't really efficient.  If I were you, I wouldn't worry about it, it's not a big deal, it is actually more useful than hurtful.<br><br>Mod:<br><br>After thinking about it, there is another possibility...<br>Using a "filt" binding, and checking there...<br><br>Something like...<div class="codebox"><p>Code: </p><pre><code>bind filt - ".te*" testcheckproc testcheck {idx text} {  set key [string tolower [lindex [split $text] 0]]  if {$key == ".testchan"} { return $text }  return ""}</code></pre></div>Of course, this too can have side effects, such as if you have other commands that start with ".te" .. you'd have to incorporate them into the<br>filt procedure as well.<br><blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>bind dcc n testchan dcc:testchanproc dcc:testchan {hand idx nick} {</code></pre></div>So i have a normal bind, use this format for most of my commands on my bot. but i have a feeling i havent done it right. for example. <br><br>doing<br><br>.testc <br><br>on partyline activates the script, which i dont want. Is there a simple bit of formatting of the bind which will make the need of the whole command to be typed in order to be executed. <br><br>Thanks<br><br>Weirdo</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sun Nov 10, 2002 12:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Weirdo]]></name></author>
		<updated>2002-11-09T10:05:37-04:00</updated>

		<published>2002-11-09T10:05:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12967#p12967</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12967#p12967"/>
		<title type="html"><![CDATA[Simple little query - binds formatting]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12967#p12967"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind dcc n testchan dcc:testchanproc dcc:testchan {hand idx nick} {</code></pre></div>So i have a normal bind, use this format for most of my commands on my bot. but i have a feeling i havent done it right. for example. <br><br>doing<br><br>.testc <br><br>on partyline activates the script, which i dont want. Is there a simple bit of formatting of the bind which will make the need of the whole command to be typed in order to be executed. <br><br>Thanks<br><br>Weirdo<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1195">Weirdo</a> — Sat Nov 09, 2002 10:05 am</p><hr />
]]></content>
	</entry>
	</feed>
