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
|
||||
( answerMsg
|
||||
, getCommand
|
||||
, getDestination
|
||||
, readMsg
|
||||
, writeMsg
|
||||
) where
|
||||
|
@ -36,3 +37,8 @@ getCommand (IRC.Message _ _ (_:msg:[])) = do
|
|||
else 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
|
||||
Version: 0.4.12
|
||||
Version: 0.4.13
|
||||
Cabal-version: >=1.2
|
||||
Synopsis: A multipurposes IRC bot
|
||||
Description:
|
||||
|
|
Reference in a new issue