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

	<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>2007-01-30T00:51:34-04:00</updated>

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

		<entry>
		<author><name><![CDATA[atreides]]></name></author>
		<updated>2007-01-30T00:51:34-04:00</updated>

		<published>2007-01-30T00:51:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70070#p70070</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70070#p70070"/>
		<title type="html"><![CDATA[Looking for a script or module to create custom commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70070#p70070"><![CDATA[
I'm finding that your script stopped working after awhile.  I tried restarting the eggdrop and it doesnt respond to !addcommand anymore.  It worked fine but i tried to delete binds.  Then, i set a new .txt file to add information to but this isnt working.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8409">atreides</a> — Tue Jan 30, 2007 12:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2007-01-27T20:39:31-04:00</updated>

		<published>2007-01-27T20:39:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69996#p69996</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69996#p69996"/>
		<title type="html"><![CDATA[Looking for a script or module to create custom commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69996#p69996"><![CDATA[
I will get back to this when I have more time (i.e. When the semester finishes and when the bullshit happening in the country comes to rest).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Jan 27, 2007 8:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[piggy]]></name></author>
		<updated>2007-01-27T16:21:38-04:00</updated>

		<published>2007-01-27T16:21:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69987#p69987</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69987#p69987"/>
		<title type="html"><![CDATA[Looking for a script or module to create custom commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69987#p69987"><![CDATA[
<strong class="text-strong">Sir_Fz:</strong>  A couple of questions to this tcl code.<br><br><strong class="text-strong">First Question</strong><br><br>Is it possible to make it that you can either state the nickname you want the command to be issued for, or if no nickname is stated then it will do the command for the nickname that issued the command.<br><br>Example:<br><br>&lt;nickname&gt; !beer MrX<br>* bot brings MrX a nice cold beer<br><br>or<br><br>(nickname) !beer<br>*bot brings (nickname) a nice cold beer<br><br><br><strong class="text-strong">Second question:</strong><br><br>Is there any chance of making it that you can add a command that makes the bot select a diffrent item from a list of items and a diffrent action for the responses each time the comand is issued?<br><br><strong class="text-strong">Example of the command that would be set:</strong><br><br>(owner) !addcommand !beer (pulls out (a fine|an excellent|an excquisite|a tasty|a nicely refined) <strong class="text-strong">|</strong> pours a (pint|litre|quart) of (Guinness|Amstel|Castle|Jever|Yuengling Lager|Black Label|Piraat|Franziskaner Hefeweizen) for<br><br>(nickname) !beer<br>*bot pulls out an excellent litre of Yuengling Lager for (nickname)<br><br>next time the command is issued it responds diffrently.<br><br>(nickname) !beer MrX<br>*bot pours a pint of Guinness for MrX<br><br><br><strong class="text-strong">Third Question</strong><br><br>Is it possible to make it that you can add a command that is 2 words?<br><br>Example:<br><br>(owner) !addcommand !beer me<br><br>(nickname) !beer me<br>*bot pours a quart of Amstel for (nickname)<br><br><br><strong class="text-strong">If this is asking for to much just tell me, i just thought it would be nice to add abit more functionalty to this tcl, make the bot have diffrent responses for the same command</strong> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Thanks for any help you can give on this  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6625">piggy</a> — Sat Jan 27, 2007 4:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[pavel_kbc]]></name></author>
		<updated>2007-01-04T15:41:32-04:00</updated>

		<published>2007-01-04T15:41:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69466#p69466</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69466#p69466"/>
		<title type="html"><![CDATA[Looking for a script or module to create custom commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69466#p69466"><![CDATA[
Sir_Fz, can you please edit for me?<br><br>like this <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>&lt;x-r00t-x&gt; !addcommand !cmds notice %nick testing<br>-lord- Added add:!cmds command.<br>&lt;x-r00t-x&gt; !cmds x-r00t-x<br>-lord- testing<br><br>i mean i want to set command like "notice , privmsg, etc"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8548">pavel_kbc</a> — Thu Jan 04, 2007 3:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-12-30T20:52:44-04:00</updated>

		<published>2006-12-30T20:52:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69373#p69373</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69373#p69373"/>
		<title type="html"><![CDATA[Looking for a script or module to create custom commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69373#p69373"><![CDATA[
I already fixed that. The bug was in using the [lsearch] command, instead of using [lsearch &lt;switch&gt; &lt;list&gt; &lt;element&gt;] I was using [lsearch &lt;list&gt; &lt;switch&gt; &lt;element&gt;] which obviously is fixed in the code edit. Replace your old code with the new edited code and rehash your Eggdrop.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Dec 30, 2006 8:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[pavel_kbc]]></name></author>
		<updated>2006-12-30T20:05:09-04:00</updated>

		<published>2006-12-30T20:05:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69371#p69371</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69371#p69371"/>
		<title type="html"><![CDATA[Looking for a script or module to create custom commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69371#p69371"><![CDATA[
Sir_fz<br>what about this one ?<br><br>&lt;ra1nb0w&gt; [02:06] Tcl error [del:command]: bad option "! !testing": must be -all, -ascii, -decreasing, -dictionary, -exact, -glob, -increasing, -inline, -integer, -not, -real, -regexp, -sorted, or -start<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8548">pavel_kbc</a> — Sat Dec 30, 2006 8:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-12-29T16:43:16-04:00</updated>

		<published>2006-12-29T16:43:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69341#p69341</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69341#p69341"/>
		<title type="html"><![CDATA[Looking for a script or module to create custom commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69341#p69341"><![CDATA[
I've edited the code, these errors shouldn't occur anymore.<br><br>I wonder why nobody reported this before, they request and don't use? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Fri Dec 29, 2006 4:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[pavel_kbc]]></name></author>
		<updated>2006-12-29T16:07:41-04:00</updated>

		<published>2006-12-29T16:07:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69339#p69339</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69339#p69339"/>
		<title type="html"><![CDATA[Looking for a script or module to create custom commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69339#p69339"><![CDATA[
when i type : &lt;r00t-fck&gt; !delcommand !testing<br>its show me error on partyline: <br>&lt;ra1nb0w&gt; [02:06] Tcl error [del:command]: bad option "! !testing": must be -all, -ascii, -decreasing, -dictionary, -exact, -glob, -increasing, -inline, -integer, -not, -real, -regexp, -sorted, or -start<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8548">pavel_kbc</a> — Fri Dec 29, 2006 4:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[pavel_kbc]]></name></author>
		<updated>2006-12-29T16:01:22-04:00</updated>

		<published>2006-12-29T16:01:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69338#p69338</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69338#p69338"/>
		<title type="html"><![CDATA[Looking for a script or module to create custom commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69338#p69338"><![CDATA[
&lt;ra1nb0w&gt; [02:01] Tcl error [del:command]: missing "<br>&lt;ra1nb0w&gt; [02:01] Tcl error [del:command]: missing "<br><br><br>i fixed. <br><br>proc del:command {n u h c a} {<br> global allcommands<br> set cmd [string tolower [lindex [split $a] 0]]<br> if {![catch {unbind pub - $cmd added:$cmd}]} {<br>  if {[set i [lsearch $allcommands -exact $cmd]] != -1} {<br>   set allcommands [lreplace $allcommands $i $i]<br>  }<br>  puthelp "notice $n :Successfully remove \002$cmd\002 PUB command."<br> } {<br><strong class="text-strong">puthelp "notice $n :Command \002$cmd\002 does not exist."</strong><br> }<br>}<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8548">pavel_kbc</a> — Fri Dec 29, 2006 4:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CuteBangla]]></name></author>
		<updated>2006-12-29T09:35:58-04:00</updated>

		<published>2006-12-29T09:35:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69332#p69332</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69332#p69332"/>
		<title type="html"><![CDATA[Looking for a script or module to create custom commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69332#p69332"><![CDATA[
Use the Command like<br><blockquote class="uncited"><div>&lt;SuMiT&gt;!addcommand !testing %nick is testing<br>&lt;SuMiT&gt;!testing<br>-CuteBangla- Added add:!testing command.<br>*CuteBangla SuMiT is testing</div></blockquote><blockquote class="uncited"><div>&lt;x-r00t-x&gt; !addcommand testing PRIVMSG x-r00t-x testing<br>-lord- Added add:testing command.<br>&lt;x-r00t-x&gt; testing<br>* lord PRIVMSG x-r00t-x testing<br><br><br>Please help meee <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad">(<br><br>how do i fix it ?</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7425">CuteBangla</a> — Fri Dec 29, 2006 9:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[pavel_kbc]]></name></author>
		<updated>2006-12-29T09:27:19-04:00</updated>

		<published>2006-12-29T09:27:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69329#p69329</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69329#p69329"/>
		<title type="html"><![CDATA[Looking for a script or module to create custom commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69329#p69329"><![CDATA[
&lt;x-r00t-x&gt; !addcommand testing PRIVMSG x-r00t-x testing<br>-lord- Added add:testing command.<br>&lt;x-r00t-x&gt; testing<br>* lord PRIVMSG x-r00t-x testing<br><br><br>Please help meee <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad">(<br><br>how do i fix it ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8548">pavel_kbc</a> — Fri Dec 29, 2006 9:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dq]]></name></author>
		<updated>2006-06-16T13:56:30-04:00</updated>

		<published>2006-06-16T13:56:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64104#p64104</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64104#p64104"/>
		<title type="html"><![CDATA[Looking for a script or module to create custom commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64104#p64104"><![CDATA[
Looking good Sir_Fz, you've done it again! haha<br><br>Anyway we can include flood protection so we don't get kids constantly typing .bindhere and the bot trying to respond?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7571">dq</a> — Fri Jun 16, 2006 1:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-12-29T16:40:58-04:00</updated>

		<published>2006-06-12T09:06:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63928#p63928</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63928#p63928"/>
		<title type="html"><![CDATA[Looking for a script or module to create custom commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63928#p63928"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set cmdsfile "scripts/cmds.txt"if {![file exists $cmdsfile]} { set fileid [open $cmdsfile w] close $fileid} { source $cmdsfile}set allcommands [list]foreach donecmd [split [read [set fileid [open $cmdsfile]]][close $fileid] \n][unset fileid] { if {[string match -nocase "bind pub - *" $donecmd]} {  lappend allcommands [lindex [split $donecmd] 3] }}bind pub n !addcommand add:commandbind pub n !countcmds count:commandbind pub n !delcommand del:commandproc add:command {n u h c a} { global addedcommands set command [string tolower [lindex [split $a] 0]] set action [join [lrange [split $a] 1 end]] if {[info command added:$command] == ""} {  set addedcommands($command) $action  proc added:$command {n u h c a} {   global addedcommands   puthelp "privmsg $c :\001ACTION [string map [list %nick [lindex [split $a] 0]] $addedcommands($::lastbind)]\001"  }  bind pub - $command added:$command  save:command $command $action  puthelp "notice $n :Added add:$command command." } {  puthelp "notice $n :Command added:$command already exists." }}proc count:command {n u h c a} { global allcommands if {[llength $allcommands]} {  puthelp "privmsg $c :Available commands: [join $allcommands]" } {  puthelp "privmsg $c :No commands available." }}proc del:command {n u h c a} { global allcommands set cmd [string tolower [lindex [split $a] 0]] if {![catch {unbind pub - $cmd added:$cmd}]} {  if {[set i [lsearch -exact $allcommands $cmd]] != -1} {   set allcommands [lreplace $allcommands $i $i]  }  puthelp "notice $n :Successfully remove \002$cmd\002 PUB command." } {  puthelp "notice $n :Command \002$cmd\002 does not exist." }}  proc save:command {c act} { global cmdsfile set c [string map {\[ \\\[ \] \\\] \\ \\\\} $c] set cmdlist [split [read [set f [open $cmdsfile]]] \n][close $f] lappend cmdlist "bind pub - $c added:$c" lappend cmdlist "" lappend cmdlist "set addedcommands($c) [list $act]" lappend cmdlist "" set f [open $cmdsfile w] foreach cmd $cmdlist {  puts $f $cmd } puts $f [printproc added:$c] close $f}# user's proc from the Tcl faq forumproc printproc proc {   set args {}   foreach arg [info args $proc] {      if {[info default $proc $arg val]} {         lappend args [list $arg $val]      } {         lappend args [list $arg]      }   }   list proc $proc $args [info body $proc]}</code></pre></div>This will unbind the command if it exists (will make it unfunctional) but will not remove it from the .txt (you'll have to remove it manually).<br><br>Edit: Fixed missing " and bug in using [lsearch].<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Mon Jun 12, 2006 9:06 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dq]]></name></author>
		<updated>2006-06-11T20:00:30-04:00</updated>

		<published>2006-06-11T20:00:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63909#p63909</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63909#p63909"/>
		<title type="html"><![CDATA[Looking for a script or module to create custom commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63909#p63909"><![CDATA[
<blockquote class="uncited"><div>Try:<div class="codebox"><p>Code: </p><pre><code>set cmdsfile "scripts/cmds.txt"if {![file exists $cmdsfile]} { set fileid [open $cmdsfile w] close $fileid} { source $cmdsfile}set allcommands [list]foreach donecmd [split [read [set fileid [open $cmdsfile]]][close $fileid] \n][unset fileid] { if {[string match -nocase "bind pub - *" $donecmd]} {  lappend allcommands [lindex [split $donecmd] 3] }}bind pub n !addcommand add:commandbind pub n !countcmds count:commandproc add:command {n u h c a} { global addedcommands set command [lindex [split $a] 0] set action [join [lrange [split $a] 1 end]] if {[info command added:$command] == ""} {  set addedcommands($command) $action  proc added:$command {n u h c a} {   global addedcommands   puthelp "privmsg $c :\001ACTION [string map [list %nick [lindex [split $a] 0]] $addedcommands($::lastbind)]\001"  }  bind pub - $command added:$command  save:command $command $action  puthelp "notice $n :Added add:$command command." } {  puthelp "notice $n :Command added:$command already exists." }}proc count:command {n u h c a} { global allcommands if {[llength $allcommands]} {  puthelp "privmsg $c :Available commands: [join $allcommands]" } {  puthelp "privmsg $c :No commands available." }}proc save:command {c act} { global cmdsfile set c [string map {\[ \\\[ \] \\\] \\ \\\\} $c] set cmdlist [split [read [set f [open $cmdsfile]]] \n][close $f] lappend cmdlist "bind pub - $c added:$c" lappend cmdlist "" lappend cmdlist "set addedcommands($c) [list $act]" lappend cmdlist "" set f [open $cmdsfile w] foreach cmd $cmdlist {  puts $f $cmd } puts $f [printproc added:$c] close $f}# user's proc from the Tcl faq forumproc printproc proc {   set args {}   foreach arg [info args $proc] {      if {[info default $proc $arg val]} {         lappend args [list $arg $val]      } {         lappend args [list $arg]      }   }   list proc $proc $args [info body $proc]}</code></pre></div>type <strong class="text-strong">!countcmds</strong> on chan.</div></blockquote>Very nice script Sir_Fz, but is it possible to unbind them.. because removing the cmds.txt or clearing it doesn't seem to do the trick <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7571">dq</a> — Sun Jun 11, 2006 8:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-03-29T17:22:48-04:00</updated>

		<published>2006-03-29T17:22:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61528#p61528</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61528#p61528"/>
		<title type="html"><![CDATA[Looking for a script or module to create custom commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61528#p61528"><![CDATA[
Try:<div class="codebox"><p>Code: </p><pre><code>set cmdsfile "scripts/cmds.txt"if {![file exists $cmdsfile]} { set fileid [open $cmdsfile w] close $fileid} { source $cmdsfile}set allcommands [list]foreach donecmd [split [read [set fileid [open $cmdsfile]]][close $fileid] \n][unset fileid] { if {[string match -nocase "bind pub - *" $donecmd]} {  lappend allcommands [lindex [split $donecmd] 3] }}bind pub n !addcommand add:commandbind pub n !countcmds count:commandproc add:command {n u h c a} { global addedcommands set command [lindex [split $a] 0] set action [join [lrange [split $a] 1 end]] if {[info command added:$command] == ""} {  set addedcommands($command) $action  proc added:$command {n u h c a} {   global addedcommands   puthelp "privmsg $c :\001ACTION [string map [list %nick [lindex [split $a] 0]] $addedcommands($::lastbind)]\001"  }  bind pub - $command added:$command  save:command $command $action  puthelp "notice $n :Added add:$command command." } {  puthelp "notice $n :Command added:$command already exists." }}proc count:command {n u h c a} { global allcommands if {[llength $allcommands]} {  puthelp "privmsg $c :Available commands: [join $allcommands]" } {  puthelp "privmsg $c :No commands available." }}proc save:command {c act} { global cmdsfile set c [string map {\[ \\\[ \] \\\] \\ \\\\} $c] set cmdlist [split [read [set f [open $cmdsfile]]] \n][close $f] lappend cmdlist "bind pub - $c added:$c" lappend cmdlist "" lappend cmdlist "set addedcommands($c) [list $act]" lappend cmdlist "" set f [open $cmdsfile w] foreach cmd $cmdlist {  puts $f $cmd } puts $f [printproc added:$c] close $f}# user's proc from the Tcl faq forumproc printproc proc {   set args {}   foreach arg [info args $proc] {      if {[info default $proc $arg val]} {         lappend args [list $arg $val]      } {         lappend args [list $arg]      }   }   list proc $proc $args [info body $proc]}</code></pre></div>type <strong class="text-strong">!countcmds</strong> on chan.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Wed Mar 29, 2006 5:22 pm</p><hr />
]]></content>
	</entry>
	</feed>
