From c74d199047825b737cb00ca83360f9d410af6a75 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sun, 26 Feb 2012 14:15:49 +0100 Subject: Added support for IRC server password --- Hsbot/Core.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Hsbot/Core.hs') diff --git a/Hsbot/Core.hs b/Hsbot/Core.hs index 89f4471..1668f62 100644 --- a/Hsbot/Core.hs +++ b/Hsbot/Core.hs @@ -70,6 +70,9 @@ runHsbot die_msgs = do config = envConfig env nickname = head $ configNicknames config channels = configChannels config + case configPassword config of + Just pass -> liftIO . sendStr env connhdl tlsCtx . IRC.encode $ IRC.Message Nothing "PASS" [pass] + Nothing -> return () liftIO . sendStr env connhdl tlsCtx . IRC.encode $ IRC.nick nickname liftIO . sendStr env connhdl tlsCtx . IRC.encode $ IRC.user nickname hostname "*" (configRealname config) -- Then we join channels -- cgit v1.2.3