egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Quotes.tcl v0.1

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
rt
Voice


Joined: 08 Jul 2005
Posts: 25

PostPosted: Sat Jan 28, 2006 3:28 pm    Post subject: Quotes.tcl v0.1 Reply with quote

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. Smile

Download link: http://www.djcalleh.net/quotes.tcl

YOU MUST HAVE http://www.djcalleh.net/vars.tcl
Back to top
View user's profile Send private message
rt
Voice


Joined: 08 Jul 2005
Posts: 25

PostPosted: Tue Jan 31, 2006 4:25 am    Post subject: Reply with quote

Umm, no one interested? Razz
Back to top
View user's profile Send private message
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Tue Jan 31, 2006 4:57 am    Post subject: Reply with quote

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 Smile

Take my advice/suggestions or don't. That's completely upto you Smile
Back to top
View user's profile Send private message
rt
Voice


Joined: 08 Jul 2005
Posts: 25

PostPosted: Tue Jan 31, 2006 5:41 am    Post subject: Reply with quote

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
View user's profile Send private message
krieg
Voice


Joined: 20 Nov 2007
Posts: 13

PostPosted: Tue Nov 20, 2007 11:37 am    Post subject: Reply with quote

Links are broken.
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Tue Nov 20, 2007 6:41 pm    Post subject: Reply with quote

krieg wrote:
Links are broken.

Look at the original post date and then put 2 and 2 together. Rolling Eyes
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
MenzAgitat
Op


Joined: 04 Jul 2006
Posts: 118
Location: France

PostPosted: Tue Nov 20, 2007 7:56 pm    Post subject: Reply with quote

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 Wink
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber