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

	<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-02-22T13:15:45-04:00</updated>

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

		<entry>
		<author><name><![CDATA[^DooM^]]></name></author>
		<updated>2005-02-22T13:15:45-04:00</updated>

		<published>2005-02-22T13:15:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46857#p46857</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46857#p46857"/>
		<title type="html"><![CDATA[script that will reply custom text when command is unknown]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46857#p46857"><![CDATA[
<blockquote class="uncited"><div>make sure mbl is executed after all your binds.</div></blockquote>Just to clarify what spock means by that is make sure that script is the very last one on your source scripts/script.tcl list at the bottom of your config file  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3723">^DooM^</a> — Tue Feb 22, 2005 1:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spock]]></name></author>
		<updated>2005-02-22T12:13:08-04:00</updated>

		<published>2005-02-22T12:13:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46854#p46854</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46854#p46854"/>
		<title type="html"><![CDATA[script that will reply custom text when command is unknown]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46854#p46854"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pubm - "% !*" pubm:checkproc pubm:check { n u h c t } {  if {[lsearch -exact $::bl [lindex [split $t] 0]]!=-1} { return }  putserv "PRIVMSG $c :please type in !help for available commands"}proc mbl {} {  set ::bl {}  foreach b [binds pub*] {lappend ::bl [lindex [lindex $b 2] end]}}mbl</code></pre></div>here is code for doom's suggestion. didn't test, but it should work. make sure mbl is executed after all your binds.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2369">spock</a> — Tue Feb 22, 2005 12:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[yoda989]]></name></author>
		<updated>2005-02-21T21:04:33-04:00</updated>

		<published>2005-02-21T21:04:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46841#p46841</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46841#p46841"/>
		<title type="html"><![CDATA[script that will reply custom text when command is unknown]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46841#p46841"><![CDATA[
Thanks for the tips everone.<br>however, being  total noob i am afraid it doesnt help me much.<br>Can someone help with a complete script?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6003">yoda989</a> — Mon Feb 21, 2005 9:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2005-02-21T08:22:54-04:00</updated>

		<published>2005-02-21T08:22:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46824#p46824</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46824#p46824"/>
		<title type="html"><![CDATA[script that will reply custom text when command is unknown]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46824#p46824"><![CDATA[
Or <a href="http://tmml.sourceforge.net/doc/tcl/switch.html" class="postlink">switch</a> if you don't care for speed. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Feb 21, 2005 8:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[^DooM^]]></name></author>
		<updated>2005-02-21T08:05:21-04:00</updated>

		<published>2005-02-21T08:05:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46823#p46823</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46823#p46823"/>
		<title type="html"><![CDATA[script that will reply custom text when command is unknown]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46823#p46823"><![CDATA[
<blockquote class="uncited"><div>A more efficient solution would be a structure like this, for your proc:<br><br>You can use bind pubm with this and match [lindex $text 0] for the trigger you want in this case, so it will be binded to "*".<br><blockquote class="uncited"><div>if { ..... } {<br> #do help1<br>}<br>elseif { .... } {<br> #do help2<br>}<br>elseif { .... } {<br> #do help3<br>}<br>elseif { .... } {<br> #do help4<br>}<br>else {<br> <strong class="text-strong">PUT INVALID COMMAND IN HERE</strong><br>}</div></blockquote></div></blockquote>If i understand what you are saying you want him to add an if statement for every bind he has?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3723">^DooM^</a> — Mon Feb 21, 2005 8:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-02-21T07:30:36-04:00</updated>

		<published>2005-02-21T07:30:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46821#p46821</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46821#p46821"/>
		<title type="html"><![CDATA[script that will reply custom text when command is unknown]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46821#p46821"><![CDATA[
A more efficient solution would be a structure like this, for your proc:<br><br>You can use bind pubm with this and match [lindex $text 0] for the trigger you want in this case, so it will be binded to "*".<br><blockquote class="uncited"><div>if { ..... } {<br> #do help1<br>}<br>elseif { .... } {<br> #do help2<br>}<br>elseif { .... } {<br> #do help3<br>}<br>elseif { .... } {<br> #do help4<br>}<br>else {<br> <strong class="text-strong">PUT INVALID COMMAND IN HERE</strong><br>}</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Mon Feb 21, 2005 7:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[^DooM^]]></name></author>
		<updated>2005-02-21T06:53:50-04:00</updated>

		<published>2005-02-21T06:53:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46817#p46817</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46817#p46817"/>
		<title type="html"><![CDATA[script that will reply custom text when command is unknown]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46817#p46817"><![CDATA[
I think he means external commands rather than dcc commands.<br><br>When text is sent to a channel the eggdrop evaluates it and checks what it see's on channel to what it has listed in its bind list. If it doesn't exist in the bind list it ignores the text untill the next set of text it see's so any potential text in a channel could be considered as a trigger it doesn't have to start with a !.<br><br>The way it could be done is to write a script that executes when it sees a '!' at the start of a line. Have a list that contains all of the binds that exist already. If a trigger is seen that already exists return the procedure else if its not in the list then print use !help.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3723">^DooM^</a> — Mon Feb 21, 2005 6:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-02-21T06:39:24-04:00</updated>

		<published>2005-02-21T06:39:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46816#p46816</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46816#p46816"/>
		<title type="html"><![CDATA[script that will reply custom text when command is unknown]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46816#p46816"><![CDATA[
Eggdrop already replies with <blockquote class="uncited"><div>What? You need '.help'</div></blockquote>when someone types an invalid command.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Mon Feb 21, 2005 6:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[yoda989]]></name></author>
		<updated>2005-02-21T02:45:14-04:00</updated>

		<published>2005-02-21T02:45:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46813#p46813</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46813#p46813"/>
		<title type="html"><![CDATA[script that will reply custom text when command is unknown]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46813#p46813"><![CDATA[
Hi,<br><br>Maybe someone can help me with this?<br>When users type in wrong or command which does not exist I would like eggdrop to respond with custom text - something like "please type in !help for available commands"<br><br>I hope you guys can help me with this.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6003">yoda989</a> — Mon Feb 21, 2005 2:45 am</p><hr />
]]></content>
	</entry>
	</feed>
