summaryrefslogtreecommitdiff
path: root/Hsbot/Types.hs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Hsbot/Types.hs22
1 files changed, 11 insertions, 11 deletions
diff --git a/Hsbot/Types.hs b/Hsbot/Types.hs
index 7a37035..5522404 100644
--- a/Hsbot/Types.hs
+++ b/Hsbot/Types.hs
@@ -22,10 +22,10 @@ import System.Time (ClockTime)
-- | TODO : a monad for a channel, and a monad for a server, all together driven by a Bot?
-- | Configuration data type
-data Config = Config {
- commandPrefixes :: String, -- command prefixes, for example @[\'>\',\'@\',\'?\']@
- ircServer :: IrcServer -- list of 'Server's to connect to
-} deriving (Show)
+data Config = Config
+ { commandPrefix :: Char -- command prefixes, for example @[\'>\',\'@\',\'?\']@
+ , ircServer :: IrcServer -- list of 'Server's to connect to
+ } deriving (Show)
-- | An IRC server
data IrcServer = IrcServer
@@ -76,19 +76,19 @@ data Channel = Channel
, channelAdmins :: [String] -- the bot administrators
} deriving (Show)
--- | A Bot command
-data IntCmd = IntCmd
- { intCmd :: String -- the bot's internal command
- , intCmdParams :: [String] -- the parameters
- } deriving (Show)
-
--- |An IRC message.
+-- | An IRC message
data IrcMsg = IrcMsg
{ prefix :: Maybe String -- the message prefix
, command :: String -- the message command
, parameters :: [String] -- the message parameters
} deriving (Show)
+-- | An internal command
+data IntCmd = IntCmd
+ { intCmd :: String -- the internal command
+ , intMsg :: IrcMsg -- the IrcMsg associated with the command
+ }
+
-- | A plugin definition
data Plugin = Plugin
{ pluginName :: String -- The plugin's name