Archived
1
0
Fork 0

Added support for IRC server password

This commit is contained in:
Julien Dessaux 2012-02-26 14:15:49 +01:00
parent 5e3b91929d
commit c74d199047
3 changed files with 5 additions and 0 deletions

View file

@ -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