Implemented ircbot update messages.
This commit is contained in:
parent
5b8cffbf68
commit
a12e492772
6 changed files with 73 additions and 44 deletions
Hsbot/Irc
|
@ -21,17 +21,18 @@ type IrcBot = StateT IrcBotState IO
|
|||
|
||||
-- | An Ircbot state
|
||||
data IrcBotState = IrcBotState
|
||||
{ ircBotStartTime :: UTCTime -- the bot's uptime
|
||||
{ ircBotStartTime :: UTCTime -- the bot's uptime
|
||||
, ircBotPlugins :: M.Map String (IrcPluginState, ThreadId) -- Loaded plugins
|
||||
, ircBotCommands :: M.Map String [String] -- Loaded plugins
|
||||
, ircBotChan :: Chan IrcBotMsg -- The IrcBot's communication channel
|
||||
, ircBotMasterChan :: Chan BotMsg -- The Hsbot communication channel
|
||||
, ircBotMyChan :: Chan BotMsg -- The Hsbot communication channel
|
||||
, ircBotServerState :: IrcServerState -- The state of the IrcServer
|
||||
, ircBotHandle :: Handle -- The server's socket/handle
|
||||
, ircBotConfig :: IrcConfig -- The starting configuration
|
||||
, ircBotReaderThreadId :: ThreadId
|
||||
, ircBotMasterReaderThreadId :: ThreadId
|
||||
, ircBotCommands :: M.Map String [String] -- Loaded plugins
|
||||
, ircBotChan :: Chan IrcBotMsg -- The IrcBot's communication channel
|
||||
, ircBotMasterChan :: Chan BotMsg -- The Hsbot communication channel
|
||||
, ircBotMyChan :: Chan BotMsg -- The Hsbot communication channel
|
||||
, ircBotServerState :: IrcServerState -- The state of the IrcServer
|
||||
, ircBotHandle :: Handle -- The server's socket/handle
|
||||
, ircBotConfig :: IrcConfig -- The starting configuration
|
||||
, ircBotReaderThreadId :: ThreadId -- the thread that process inputs from the socket
|
||||
, ircBotMasterReaderThreadId :: ThreadId -- the thread that process inputs from the master bot
|
||||
, ircBotResumeData :: M.Map String String -- the necessary data to resume the bot's operations on reboot
|
||||
}
|
||||
|
||||
-- | The IrcServer monad
|
||||
|
|
Reference in a new issue