Archived
1
0
Fork 0

Added a function to get the destination channel of a message.

This commit is contained in:
Julien Dessaux 2011-05-11 00:17:10 +02:00
parent 91f9db5be7
commit 27df2808fc
2 changed files with 7 additions and 1 deletions

View file

@ -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 _ = ""

View file

@ -1,5 +1,5 @@
Name: hsbot
Version: 0.4.12
Version: 0.4.13
Cabal-version: >=1.2
Synopsis: A multipurposes IRC bot
Description: