Added the help command for the quote module.
This commit is contained in:
parent
d33ab441f8
commit
d0b0fb6ac1
3 changed files with 19 additions and 1 deletions
|
@ -105,6 +105,23 @@ runCommand intCmd
|
||||||
-- | quote command dispatcher
|
-- | quote command dispatcher
|
||||||
dispatchQuoteCmd :: String -> QuoteBot ()
|
dispatchQuoteCmd :: String -> QuoteBot ()
|
||||||
dispatchQuoteCmd cmd
|
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
|
| cmd == "quick" = do
|
||||||
quoteBot <- get
|
quoteBot <- get
|
||||||
now <- liftIO $ getCurrentTime
|
now <- liftIO $ getCurrentTime
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Name: hsbot-irc
|
Name: hsbot-irc
|
||||||
Version: 0.3.10
|
Version: 0.3.11
|
||||||
Cabal-version: >=1.2
|
Cabal-version: >=1.2
|
||||||
Synopsis: The irc part of a multi-purposes bot.
|
Synopsis: The irc part of a multi-purposes bot.
|
||||||
Description:
|
Description:
|
||||||
|
|
1
TODO
1
TODO
|
@ -4,6 +4,7 @@
|
||||||
* fork process in background
|
* fork process in background
|
||||||
* implement logging capabilities
|
* implement logging capabilities
|
||||||
|
|
||||||
|
* add a function to answer by /msg to somebody
|
||||||
* write the vote system for the quote module
|
* write the vote system for the quote module
|
||||||
* only the quote reporter should be able to edit it
|
* only the quote reporter should be able to edit it
|
||||||
* detect too identical quoting in a raw, or implement quote abort
|
* detect too identical quoting in a raw, or implement quote abort
|
||||||
|
|
Reference in a new issue