Archived
1
0
Fork 0

Added configuration debug stuff.

This commit is contained in:
Julien Dessaux 2010-08-01 17:40:53 +02:00
parent 6888950b60
commit 6a7d1f0381
2 changed files with 16 additions and 3 deletions

View file

@ -22,6 +22,20 @@ data IrcConfig = IrcConfig
, ircConfigPlugins :: [String] -- the ircPlugins to load
}
instance Show IrcConfig where
show (IrcConfig address port channels nickname password realname commandPrefix plugins) = unlines $
concat [ "Address: ", address ] :
concat [ "Port: ", case port of
PortNumber num -> show num
Service s -> show s
UnixSocket u -> show u ] :
concat [ "Channels: ", show channels ] :
concat [ "Nickname: ", nickname ] :
concat [ "Password: ", password ] :
concat [ "Realname: ", realname ] :
concat [ "CommandPrefix: ", show commandPrefix ] :
[ "Plugins: ", show plugins ]
-- | User configuration
ircDefaultConfig :: IrcConfig
ircDefaultConfig = IrcConfig