Fixed quote append.
This commit is contained in:
parent
f0c95c5c28
commit
8f6fb2663c
1 changed files with 3 additions and 1 deletions
|
@ -147,9 +147,11 @@ theQuote = do
|
||||||
case reads quoteID :: [(Int, String)] of
|
case reads quoteID :: [(Int, String)] of
|
||||||
(qid,_):_ -> quoteAppend quoteDB msg qid quotee $ unwords quoteTxt
|
(qid,_):_ -> quoteAppend quoteDB msg qid quotee $ unwords quoteTxt
|
||||||
_ -> do
|
_ -> do
|
||||||
|
let quotee' = quoteID
|
||||||
|
quoteTxt' = quotee : quoteTxt
|
||||||
lastQid <- query' quoteDB (GetLastActiveQuote (getChannel msg))
|
lastQid <- query' quoteDB (GetLastActiveQuote (getChannel msg))
|
||||||
case lastQid of
|
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."
|
Nothing -> answerMsg msg $ getSender msg ++ " : Invalid quoteID."
|
||||||
"quote":"delete":quoteID:eltID ->
|
"quote":"delete":quoteID:eltID ->
|
||||||
case reads quoteID :: [(Int, String)] of
|
case reads quoteID :: [(Int, String)] of
|
||||||
|
|
Reference in a new issue