summaryrefslogtreecommitdiff
path: root/Hsbot/Core.hs
diff options
context:
space:
mode:
authorJulien Dessaux2009-08-23 23:07:43 +0200
committerJulien Dessaux2009-08-23 23:07:43 +0200
commitd4103e3e18a36523735af38eace98a64e1068e6e (patch)
tree8b5995432eaac1c0321cffcb187c7e31a4f1ff23 /Hsbot/Core.hs
parentAdded the IRCParser (thx galdor), and PrivMsg handling (simply repeat) (diff)
downloadhsbot-d4103e3e18a36523735af38eace98a64e1068e6e.tar.gz
hsbot-d4103e3e18a36523735af38eace98a64e1068e6e.tar.bz2
hsbot-d4103e3e18a36523735af38eace98a64e1068e6e.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.hs6
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