| View previous topic :: View next topic |
| Author |
Message |
rt Voice
Joined: 08 Jul 2005 Posts: 25
|
Posted: Sat Jan 28, 2006 3:28 pm Post subject: Quotes.tcl v0.1 |
|
|
Quotes.tcl - Created by Calum Wood(cal@e-frag.net)
To-do list:
- A !search command to be able to search for quotes- ie. !search *moo*
- An online interface using xela's web interface to show quotes.
Bugs:
- None as of yet.
If you find one or have a suggestion connect to Quakenet and type /msg mrBot qbug <bug/suggestion>
Commands:
- !status (to view status)
- !status on/off to change wether the script is active on the channel.
- !add <quote here>
- !del <quote here>
- !rand - brings up a random quote
- !view <quote id> - views the quote.
I am sure you all reckon that !search would be a good idea - I'm just waiting for a little feedback on v0.1 before I work on anything else.
Feedback/Comments/Suggestions Appreciated.
Download link: http://www.djcalleh.net/quotes.tcl
YOU MUST HAVE http://www.djcalleh.net/vars.tcl |
|
| Back to top |
|
 |
rt Voice
Joined: 08 Jul 2005 Posts: 25
|
Posted: Tue Jan 31, 2006 4:25 am Post subject: |
|
|
Umm, no one interested?  |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Tue Jan 31, 2006 4:57 am Post subject: |
|
|
Some notes
| Code: | | source /home/Kicky/calbot/scripts/vars.tcl |
this line is found in the code, this is basically stupid as this path will never be right for 99.9999% of all users
| Code: | | if {[string match -nocase $arguments ""]} { |
i would personally just use
| Code: | | if {[lindex [split $arguments] 0] == ""} { |
seeing as your code would get an error because you don't split $arguments
| Code: | if {[string match -nocase $arguments ""]} {
putquick "NOTICE $nickname :Quotes.tcl is currently [quotes::check $channel]"
}
if {[string match -nocase $arguments "on"]} {
channel set $channel +quote
putquick "NOTICE $nickname :Done. Quotes are now enabled."
return
}
if {[string match -nocase $arguments "off"]} {
channel set $channel -quote
putquick "NOTICE $nickname :Done. Quotes are now disabled."
} |
It's imo better to use
| Code: | if {[string equal -nocase [lindex [split $arguments] 0] on]} {
channel set $channel +quote
putquick "NOTICE $nickname :Done. Quotes are now enabled."
} elseif {[string equal -nocase [lindex [split $arguments] 0] off]} {
channel set $channel -quote
putquick "NOTICE $nickname :Done. Quotes are now enabled."
} else {
putquick "NOTICE $nickname :Quotes is currently [expr {[channel get $channel quote] ? "on" : "off"}]"
} |
Viewing your code i see alot of if's where you can easily use elseif's.
All those if's are not needed and elseif would be a better a choice.
It's upto you to use what i'm saying, i'm not forcing upon it nor am i saying your a bad scripter. I used to write my scripts the same way
Take my advice/suggestions or don't. That's completely upto you  |
|
| Back to top |
|
 |
rt Voice
Joined: 08 Jul 2005 Posts: 25
|
Posted: Tue Jan 31, 2006 5:41 am Post subject: |
|
|
Hi metroid
Thanks for your suggestions, I appreciate them. I hope you didn't mind however I updated the script with your suggestions. |
|
| Back to top |
|
 |
krieg Voice
Joined: 20 Nov 2007 Posts: 13
|
Posted: Tue Nov 20, 2007 11:37 am Post subject: |
|
|
| Links are broken. |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Nov 20, 2007 6:41 pm Post subject: |
|
|
| krieg wrote: | | Links are broken. |
Look at the original post date and then put 2 and 2 together.  _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
MenzAgitat Op

Joined: 04 Jul 2006 Posts: 118 Location: France
|
Posted: Tue Nov 20, 2007 7:56 pm Post subject: |
|
|
If you are looking for a full featured quotes manager script and a working link, you can take a look at my Public Quotes System  |
|
| Back to top |
|
 |
|