| View previous topic :: View next topic |
| Author |
Message |
pavel_kbc Voice
Joined: 28 Dec 2006 Posts: 23
|
Posted: Fri Dec 29, 2006 4:01 pm Post subject: |
|
|
<ra1nb0w> [02:01] Tcl error [del:command]: missing "
<ra1nb0w> [02:01] Tcl error [del:command]: missing "
i fixed.
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 $allcommands -exact $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."
}
} |
|
| Back to top |
|
 |
pavel_kbc Voice
Joined: 28 Dec 2006 Posts: 23
|
Posted: Fri Dec 29, 2006 4:07 pm Post subject: |
|
|
when i type : <r00t-fck> !delcommand !testing
its show me error on partyline:
<ra1nb0w> [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 |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Fri Dec 29, 2006 4:43 pm Post subject: |
|
|
I've edited the code, these errors shouldn't occur anymore.
I wonder why nobody reported this before, they request and don't use?  _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
pavel_kbc Voice
Joined: 28 Dec 2006 Posts: 23
|
Posted: Sat Dec 30, 2006 8:05 pm Post subject: |
|
|
Sir_fz
what about this one ?
<ra1nb0w> [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 _________________ join my irc channel |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Dec 30, 2006 8:52 pm Post subject: |
|
|
I already fixed that. The bug was in using the [lsearch] command, instead of using [lsearch <switch> <list> <element>] I was using [lsearch <list> <switch> <element>] which obviously is fixed in the code edit. Replace your old code with the new edited code and rehash your Eggdrop. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
pavel_kbc Voice
Joined: 28 Dec 2006 Posts: 23
|
Posted: Thu Jan 04, 2007 3:41 pm Post subject: |
|
|
Sir_Fz, can you please edit for me?
like this
<x-r00t-x> !addcommand !cmds notice %nick testing
-lord- Added add:!cmds command.
<x-r00t-x> !cmds x-r00t-x
-lord- testing
i mean i want to set command like "notice , privmsg, etc" _________________ join my irc channel |
|
| Back to top |
|
 |
piggy Voice

Joined: 21 Aug 2005 Posts: 14 Location: London
|
Posted: Sat Jan 27, 2007 4:21 pm Post subject: |
|
|
Sir_Fz: A couple of questions to this tcl code.
First Question
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.
Example:
<nickname> !beer MrX
* bot brings MrX a nice cold beer
or
(nickname) !beer
*bot brings (nickname) a nice cold beer
Second question:
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?
Example of the command that would be set:
(owner) !addcommand !beer (pulls out (a fine|an excellent|an excquisite|a tasty|a nicely refined) | pours a (pint|litre|quart) of (Guinness|Amstel|Castle|Jever|Yuengling Lager|Black Label|Piraat|Franziskaner Hefeweizen) for
(nickname) !beer
*bot pulls out an excellent litre of Yuengling Lager for (nickname)
next time the command is issued it responds diffrently.
(nickname) !beer MrX
*bot pours a pint of Guinness for MrX
Third Question
Is it possible to make it that you can add a command that is 2 words?
Example:
(owner) !addcommand !beer me
(nickname) !beer me
*bot pours a quart of Amstel for (nickname)
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
Thanks for any help you can give on this  |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Jan 27, 2007 8:39 pm Post subject: |
|
|
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). _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
atreides Voice
Joined: 20 Nov 2006 Posts: 17
|
Posted: Tue Jan 30, 2007 12:51 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
|