diff options
author | Julien Dessaux | 2010-08-22 18:16:21 +0200 |
---|---|---|
committer | Julien Dessaux | 2010-08-22 18:16:21 +0200 |
commit | d0b0fb6ac1340880d7e4f1ea423604714a11cfb4 (patch) | |
tree | b711023b9004c5609b67da69074cbf9c9f44b6e2 | |
parent | Added the quote quick command. (diff) | |
download | hsbot-d0b0fb6ac1340880d7e4f1ea423604714a11cfb4.tar.gz hsbot-d0b0fb6ac1340880d7e4f1ea423604714a11cfb4.tar.bz2 hsbot-d0b0fb6ac1340880d7e4f1ea423604714a11cfb4.zip |
Added the help command for the quote module.
-rw-r--r-- | HsbotIrcBot/Hsbot/Irc/Plugin/Quote.hs | 17 | ||||
-rw-r--r-- | HsbotIrcBot/hsbot-irc.cabal | 2 | ||||
-rw-r--r-- | TODO | 1 |
3 files changed, 19 insertions, 1 deletions
diff --git a/HsbotIrcBot/Hsbot/Irc/Plugin/Quote.hs b/HsbotIrcBot/Hsbot/Irc/Plugin/Quote.hs index 81c3794..ab4734a 100644 --- a/HsbotIrcBot/Hsbot/Irc/Plugin/Quote.hs +++ b/HsbotIrcBot/Hsbot/Irc/Plugin/Quote.hs @@ -105,6 +105,23 @@ runCommand intCmd -- | quote command dispatcher dispatchQuoteCmd :: String -> QuoteBot () dispatchQuoteCmd cmd + | cmd == "help" = + case length stuff of + 0 -> lift $ answerMsg request ("Usage: quote [append|commit|help|quick|start] {quoteId} {nickname} {quote}") + _ -> case head stuff of + "quick" -> do + lift $ answerMsg request ("quote quick [nickname] [quote]") + lift $ answerMsg request (" Performs a single line quote.") + "start" -> do + lift $ answerMsg request ("quote start [nickname] [quote]") + lift $ answerMsg request (" Begins a multi lines quote. Use either append to append new lines, or commit to terminate the quoting process.") + "append" -> do + lift $ answerMsg request ("quote append [quoteId] [nickname] [quote]") + lift $ answerMsg request (" Continue a multi line quote by appending to it.") + "commit" -> do + lift $ answerMsg request ("quote commit [quoteId]") + lift $ answerMsg request (" Terminates a multi lines quote.") + _ -> lift $ answerMsg request ("Usage: quote [append|commit|help|quick|start] {quoteId} {nickname} {quote}") | cmd == "quick" = do quoteBot <- get now <- liftIO $ getCurrentTime diff --git a/HsbotIrcBot/hsbot-irc.cabal b/HsbotIrcBot/hsbot-irc.cabal index 5e9d7d0..c170d53 100644 --- a/HsbotIrcBot/hsbot-irc.cabal +++ b/HsbotIrcBot/hsbot-irc.cabal @@ -1,5 +1,5 @@ Name: hsbot-irc -Version: 0.3.10 +Version: 0.3.11 Cabal-version: >=1.2 Synopsis: The irc part of a multi-purposes bot. Description: @@ -4,6 +4,7 @@ * fork process in background * implement logging capabilities +* add a function to answer by /msg to somebody * write the vote system for the quote module * only the quote reporter should be able to edit it * detect too identical quoting in a raw, or implement quote abort |