diff options
author | Julien Dessaux | 2009-08-23 23:07:43 +0200 |
---|---|---|
committer | Julien Dessaux | 2009-08-23 23:07:43 +0200 |
commit | d4103e3e18a36523735af38eace98a64e1068e6e (patch) | |
tree | 8b5995432eaac1c0321cffcb187c7e31a4f1ff23 /Hsbot/Core.hs | |
parent | Added the IRCParser (thx galdor), and PrivMsg handling (simply repeat) (diff) | |
download | hsbot-cb5229276f830eeff3c4cd9dea26e34649eb8cbb.tar.gz hsbot-cb5229276f830eeff3c4cd9dea26e34649eb8cbb.tar.bz2 hsbot-cb5229276f830eeff3c4cd9dea26e34649eb8cbb.zip |
Rebooting now works great, thanks to the communication channel preservation.v0.1.0
Diffstat (limited to 'Hsbot/Core.hs')
-rw-r--r-- | Hsbot/Core.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Hsbot/Core.hs b/Hsbot/Core.hs index c62ae58..fddcb72 100644 --- a/Hsbot/Core.hs +++ b/Hsbot/Core.hs @@ -49,8 +49,8 @@ isConnected (Bot bot) ircServer = ircServer `M.member` bot saveServerState :: Handle -> IrcServer -> Bot -> Bot saveServerState handle ircServer x@(Bot bot) = if ircServer `M.member` bot then x - else (Bot $ M.insert ircServer handle bot) + else (Bot $ M.insert ircServer handle bot) -saveServersStates :: [(IrcServer,Handle)] -> Bot -> Bot -saveServersStates liste bot = foldr (\(ircServer,handle) bot' -> saveServerState handle ircServer bot') bot liste +saveServersStates :: [(IrcServer, Handle)] -> Bot -> Bot +saveServersStates liste bot = foldl (\bot' (ircServer, handle) -> saveServerState handle ircServer bot') bot liste |