From b6d119cf5b14fd7198552e939d8f49b15307e74e Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sun, 25 Apr 2010 16:43:01 +0200 Subject: Some refactoring + cosmetics. --- Hsbot/IRC.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Hsbot/IRC.hs') diff --git a/Hsbot/IRC.hs b/Hsbot/IRC.hs index 1eac2d8..4a0e5f8 100644 --- a/Hsbot/IRC.hs +++ b/Hsbot/IRC.hs @@ -15,10 +15,10 @@ import Hsbot.Utils initServer :: IrcBot () initServer = do server <- gets serverConfig - sendstr $ serializeIrcMsg $ IrcMsg Nothing "NICK" [(nickname server)] - sendstr $ serializeIrcMsg $ IrcMsg Nothing "USER" [(nickname server), "0", "*", (realname server)] + sendstr . serializeIrcMsg $ IrcMsg Nothing "NICK" [(nickname server)] + sendstr . serializeIrcMsg $ IrcMsg Nothing "USER" [(nickname server), "0", "*", (realname server)] when (not . null $ password server) $ do - sendstr $ serializeIrcMsg $ IrcMsg Nothing "PRIVMSG" ["nickserv", "identify", (password server)] + sendstr . serializeIrcMsg $ IrcMsg Nothing "PRIVMSG" ["nickserv", "identify", (password server)] mapM_ joinChan (joinChannels server) -- | Run a server @@ -40,6 +40,6 @@ joinChan name = do newChannel = Channel name (nickname $ serverConfig bot) (administrators $ serverConfig bot) - sendstr $ serializeIrcMsg $ IrcMsg Nothing "JOIN" [name] + sendstr . serializeIrcMsg $ IrcMsg Nothing "JOIN" [name] put $ bot { chans = newChannel : oldChannels } -- cgit v1.2.3