From 58b197bdf49ab078d5f4f59bb84124f6ebe6b7b7 Mon Sep 17 00:00:00 2001
From: David Phillips <david@sighup.nz>
Date: Sat, 18 Mar 2017 21:05:04 +1300
Subject: Add SSL option

---
 bot.conf.example | 2 ++
 saxrobot         | 1 +
 sb_config.pm     | 2 +-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/bot.conf.example b/bot.conf.example
index f3ebb20..9d6a157 100644
--- a/bot.conf.example
+++ b/bot.conf.example
@@ -2,6 +2,8 @@ nick     = somebot
 username = bot
 ircname  = a bot
 server   = irc.example.net
+port     = 6667
+usessl   = 1
 channels = #saxtalk,#bot
 ignore   = trumpetbot,abusiveuser
 password = pleffquiffle
diff --git a/saxrobot b/saxrobot
index 065e01a..f72a95b 100755
--- a/saxrobot
+++ b/saxrobot
@@ -15,6 +15,7 @@ my $current_nick = $config{nick};
 
 # New PoCo-IRC object
 my $irc = POE::Component::IRC->spawn(
+	UseSSL => $config{usessl},
 	nick => $config{nick},
 	ircname => $config{ircname},
 	port    => $config{port},
diff --git a/sb_config.pm b/sb_config.pm
index ade80b8..ec3b004 100644
--- a/sb_config.pm
+++ b/sb_config.pm
@@ -8,7 +8,7 @@ use Config::Tiny;
 
 sub parse_config
 {
-	my @scalar_configs = ('nick', 'username', 'ircname', 'server', 'port', 'password', 'must_id', 'user', 'group');
+	my @scalar_configs = ('nick', 'username', 'ircname', 'server', 'port', 'usessl', 'password', 'must_id', 'user', 'group');
 	my @list_configs = ('channels', 'ignore', 'admins');
 	my $file = $_[0];
 	my %built_config;
-- 
cgit v1.1