diff options
author | Julien Dessaux | 2009-08-11 00:38:36 +0200 |
---|---|---|
committer | Julien Dessaux | 2009-08-11 00:38:36 +0200 |
commit | 7a86235906470749a7a6f88ff57c263cdeadde9a (patch) | |
tree | c5cba0eed5fa2a08f3efb7364898d9a0af014df5 /Hsbot/IRC.hs | |
parent | Fixed my mess with the rfc doc stuff... :p (diff) | |
download | hsbot-7a86235906470749a7a6f88ff57c263cdeadde9a.tar.gz hsbot-7a86235906470749a7a6f88ff57c263cdeadde9a.tar.bz2 hsbot-7a86235906470749a7a6f88ff57c263cdeadde9a.zip |
Rethought the way I handled IRC data.
Diffstat (limited to '')
-rw-r--r-- | Hsbot/IRC.hs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/Hsbot/IRC.hs b/Hsbot/IRC.hs index abac6b2..7922a37 100644 --- a/Hsbot/IRC.hs +++ b/Hsbot/IRC.hs @@ -1,6 +1,5 @@ module Hsbot.IRC - ( IrcInput(..) - , IrcOutput(..) + ( IrcLine(..) , connectServer , initServer , parseIrcMsg @@ -21,17 +20,12 @@ type Channel = String type Command = String type Args = [String] --- | Information from IRC -data IrcInput = Cmd User Channel (Command, Maybe String) -- a regular command - | Line User Channel String -- a normal line of little significance - | Err String -- an error occured in parsing - deriving (Eq,Show) - --- | Data that can go over the remote channel -data IrcOutput = Str String -- a regular string +-- | An IRC line +data IrcLine = Str String -- a regular string | Quit (IrcServer, Handle) -- a quit message from a server | Join (IrcServer, Channel) -- joined a channel | Part (IrcServer, Channel) -- parted the channel + | Ping (String) -- pinged by the server | Reboot -- reboot message sent | Nil -- signifies thread death, only happens after reboot deriving (Eq,Show) |