summaryrefslogtreecommitdiff
path: root/Hsbot
diff options
context:
space:
mode:
authorJulien Dessaux2011-10-01 00:29:56 +0200
committerJulien Dessaux2011-10-01 00:29:56 +0200
commit8f6fb2663c07ac2754c9dca1648bb1b223bd2636 (patch)
treee69a3120362b70b34db427144b861bdae55876de /Hsbot
parentAdded quote show. (diff)
downloadhsbot-8f6fb2663c07ac2754c9dca1648bb1b223bd2636.tar.gz
hsbot-8f6fb2663c07ac2754c9dca1648bb1b223bd2636.tar.bz2
hsbot-8f6fb2663c07ac2754c9dca1648bb1b223bd2636.zip
Fixed quote append.
Diffstat (limited to '')
-rw-r--r--Hsbot/Plugin/Quote.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Hsbot/Plugin/Quote.hs b/Hsbot/Plugin/Quote.hs
index b52137b..d022e85 100644
--- a/Hsbot/Plugin/Quote.hs
+++ b/Hsbot/Plugin/Quote.hs
@@ -147,9 +147,11 @@ theQuote = do
case reads quoteID :: [(Int, String)] of
(qid,_):_ -> quoteAppend quoteDB msg qid quotee $ unwords quoteTxt
_ -> do
+ let quotee' = quoteID
+ quoteTxt' = quotee : quoteTxt
lastQid <- query' quoteDB (GetLastActiveQuote (getChannel msg))
case lastQid of
- Just qid -> quoteAppend quoteDB msg qid quotee . unwords $ quoteID : quoteTxt
+ Just qid -> quoteAppend quoteDB msg qid quotee' $ unwords quoteTxt'
Nothing -> answerMsg msg $ getSender msg ++ " : Invalid quoteID."
"quote":"delete":quoteID:eltID ->
case reads quoteID :: [(Int, String)] of