summaryrefslogtreecommitdiff
path: root/HsbotIrcBot/Hsbot/Irc/Plugin
diff options
context:
space:
mode:
authorJulien Dessaux2010-08-01 23:29:48 +0200
committerJulien Dessaux2010-08-01 23:29:48 +0200
commit8c59b45dc7c88cea63a4cf47566a3d5124a8a0b0 (patch)
tree67b65a6ab0b3605ed21ae0725a185798638559b2 /HsbotIrcBot/Hsbot/Irc/Plugin
parentMoved the CLI argument processing stuff in its own file. (diff)
downloadhsbot-8c59b45dc7c88cea63a4cf47566a3d5124a8a0b0.tar.gz
hsbot-8c59b45dc7c88cea63a4cf47566a3d5124a8a0b0.tar.bz2
hsbot-8c59b45dc7c88cea63a4cf47566a3d5124a8a0b0.zip
Got a working hsbot-irc back online!
Diffstat (limited to '')
-rw-r--r--HsbotIrcBot/Hsbot/Irc/Plugin.hs13
1 files changed, 2 insertions, 11 deletions
diff --git a/HsbotIrcBot/Hsbot/Irc/Plugin.hs b/HsbotIrcBot/Hsbot/Irc/Plugin.hs
index 2c8e84b..40facbe 100644
--- a/HsbotIrcBot/Hsbot/Irc/Plugin.hs
+++ b/HsbotIrcBot/Hsbot/Irc/Plugin.hs
@@ -47,7 +47,6 @@ loadIrcPlugin pluginName = do
"Quote" -> ircBotPluginQuote
_ -> ircBotPluginDummy
let oldPlugins = ircBotPlugins ircbot
- oldResumeData = ircBotResumeData ircbot
-- We check for unicity
case M.lookup pluginName oldPlugins of
Just _ -> return ()
@@ -58,9 +57,7 @@ loadIrcPlugin pluginName = do
, ircPluginChan = pluginChan
, ircPluginMasterChan = masterChan }
newPlugins = M.insert pluginName (plugin, mvar, threadId) oldPlugins
- newResumeData = M.insert "PLUGINS" (show $ M.keys newPlugins) oldResumeData
- put $ ircbot { ircBotPlugins = newPlugins
- , ircBotResumeData = newResumeData }
+ put $ ircbot { ircBotPlugins = newPlugins }
-- | Sends a list of loaded plugins
listPlugins :: IrcMsg -> String -> IrcBot ()
@@ -73,13 +70,7 @@ listPlugins originalRequest dest = do
-- | Unloads a plugin
unloadIrcPlugin :: String -> IrcBot ()
-unloadIrcPlugin name = do
- killIrcPlugin name
- ircbot <- get
- let oldResumeData = ircBotResumeData ircbot
- newPlugins = M.keys $ ircBotPlugins ircbot
- newResumeData = M.insert "PLUGINS" (show newPlugins) oldResumeData
- put $ ircbot { ircBotResumeData = newResumeData }
+unloadIrcPlugin name = killIrcPlugin name
-- | kills a plugin
killIrcPlugin :: String -> IrcBot ()