Added a function to get the destination channel of a message.
This commit is contained in:
parent
91f9db5be7
commit
27df2808fc
2 changed files with 7 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
module Hsbot.Message
|
module Hsbot.Message
|
||||||
( answerMsg
|
( answerMsg
|
||||||
, getCommand
|
, getCommand
|
||||||
|
, getDestination
|
||||||
, readMsg
|
, readMsg
|
||||||
, writeMsg
|
, writeMsg
|
||||||
) where
|
) where
|
||||||
|
@ -36,3 +37,8 @@ getCommand (IRC.Message _ _ (_:msg:[])) = do
|
||||||
else return []
|
else return []
|
||||||
getCommand _ = return []
|
getCommand _ = return []
|
||||||
|
|
||||||
|
-- | Get the destination of a message
|
||||||
|
getDestination :: IRC.Message -> String
|
||||||
|
getDestination (IRC.Message _ _ (dest:_:[])) = dest
|
||||||
|
getDestination _ = ""
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Name: hsbot
|
Name: hsbot
|
||||||
Version: 0.4.12
|
Version: 0.4.13
|
||||||
Cabal-version: >=1.2
|
Cabal-version: >=1.2
|
||||||
Synopsis: A multipurposes IRC bot
|
Synopsis: A multipurposes IRC bot
|
||||||
Description:
|
Description:
|
||||||
|
|
Reference in a new issue