diff options
Diffstat (limited to '')
-rw-r--r-- | Hsbot/Irc/Core.hs | 7 | ||||
-rw-r--r-- | Hsbot/Irc/Types.hs | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/Hsbot/Irc/Core.hs b/Hsbot/Irc/Core.hs index b1aee02..2fb8386 100644 --- a/Hsbot/Irc/Core.hs +++ b/Hsbot/Irc/Core.hs @@ -145,11 +145,8 @@ reportUpdate :: IrcBot () reportUpdate = do ircbot <- get let masterChan = ircBotMasterChan ircbot - msg = IntMsg $ Msg { msgType = "UPDATE" - , msgFrom = ircConfigName $ ircBotConfig ircbot - , msgTo = "CORE" - , msgStuff = show $ ircBotResumeData ircbot - } + msg = UpdMsg $ ResMsg { resMsgFrom = ircConfigName $ ircBotConfig ircbot + , resMsgData = ircBotResumeData ircbot } liftIO $ writeChan masterChan msg -- | Process a reboot command diff --git a/Hsbot/Irc/Types.hs b/Hsbot/Irc/Types.hs index 440de64..c9be251 100644 --- a/Hsbot/Irc/Types.hs +++ b/Hsbot/Irc/Types.hs @@ -32,7 +32,7 @@ data IrcBotState = IrcBotState , 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 + , ircBotResumeData :: ResumeData -- the necessary data to resume the bot's operations on reboot } -- | The IrcServer monad |