Changeset 40 for QuoteEngine/QuoteEngine.tcl
- Timestamp:
- 02/11/09 05:38:23 (3 years ago)
- File:
-
- 1 edited
-
QuoteEngine/QuoteEngine.tcl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
QuoteEngine/QuoteEngine.tcl
r38 r40 201 201 if [matchattr $handle $quote_noflags] { return 0 } 202 202 203 if {![regexp {[0-9]+} $text]} { 204 puthelp "PRIVMSG $channel: Use: !getquote <id>" 203 set verbose "" 204 205 if {![regexp {(-v )?([0-9]+)} $text matches verbose quote_id]} { 206 puthelp "PRIVMSG $channel: Use: !getquote \[-v\] <id>" 205 207 return 0 206 208 } … … 211 213 } 212 214 213 set text [mysqlescape $text] 215 216 set text [mysqlescape $quote_id] 214 217 set sql "SELECT * FROM quotes WHERE id='$text'" 215 218 putloglev d * "QuoteEngine: executing $sql" … … 228 231 if {$chan != $channel} { 229 232 puthelp "PRIVMSG $channel :\[\002$id\002\] $quote" 230 puthelp "PRIVMSG $channel :\[\002$id\002\] From $chan, added $by at $when." 233 if {$verbose != ""} { 234 puthelp "PRIVMSG $channel :\[\002$id\002\] From $chan, by added $by at $when." 235 } 231 236 } else { 232 237 puthelp "PRIVMSG $channel :\[\002$id\002\] $quote" 233 puthelp "PRIVMSG $channel :\[\002$id\002\] Added $by at $when." 238 if {$verbose != ""} { 239 puthelp "PRIVMSG $channel :\[\002$id\002\] Added by $by at $when." 240 } 234 241 } 235 242 } else { … … 504 511 puthelp "PRIVMSG $nick : !delquote <id> - deletes a quote. You must be either a bot/channel master or the person who added the quote to delete it." 505 512 puthelp "PRIVMSG $nick : !randquote \[--all\] \[--channel=#channel\] \[-c #channel\] - fetches a random quote from the current channel. --all chooses from all channels, not just the one the command is executed from. --channel and -c choose only from the given channel." 506 puthelp "PRIVMSG $nick : !getquote <id> - fetches the quote with number <id>"513 puthelp "PRIVMSG $nick : !getquote \[-v\]<id> - fetches the quote with number <id>. Gives info of who added it if -v is specified." 507 514 puthelp "PRIVMSG $nick : !findquote \[--all\] \[--channel=#channel\] \[-c #channel\] \[--count <int>\] \[-n <int>\] <text> - finds up to <int> (default 5) quotes containing 'text'. Optional parameters same as !randquote. -n is a shortcut for --count." 508 515 puthelp "PRIVMSG $nick : !quoteurl - get the URL for the web interface to the quotes"
Note: See TracChangeset
for help on using the changeset viewer.
