From 6a7d1f0381601ee7e6b64bf41d603961d32859ac Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sun, 1 Aug 2010 17:40:53 +0200 Subject: Added configuration debug stuff. --- HsbotIrcBot/Hsbot/Irc/Config.hs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'HsbotIrcBot/Hsbot') diff --git a/HsbotIrcBot/Hsbot/Irc/Config.hs b/HsbotIrcBot/Hsbot/Irc/Config.hs index e0b8c64..ff14efd 100644 --- a/HsbotIrcBot/Hsbot/Irc/Config.hs +++ b/HsbotIrcBot/Hsbot/Irc/Config.hs @@ -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 -- cgit v1.2.3