Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Consider adding SSL support #3

wants to merge 2 commits into from

6 participants


Hey there,

I've added SSL support, and it is a very minor change, so I think it would be beneficial if you merge this into the upstream :)


Brendan Molloy added some commits

Thanks for providing this, I just put this in my copy of Phenny. Would really be nice if this was in the main release.


Considering how simple the change is, yes, it would be. Does it still apply cleanly to mainline?


I downloaded a fresh copy of the yesterday and applied these changes to get it to connect to our SSL only server. Worked fine!


Thank you bbqsrc! Works great.


Would you mind squashing the commits so that I can pull it? Thanks!


I did a git clone on bbqsrc's phenny repository and used the following in the

host = ''
port = 7000
ssl = True

and phenny disconnects with:

Connecting to connected!
Warning: Disconnected. Reconnecting in 20 seconds...

I'm afraid this doesn't work for me either. Same error as above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 12, 2010
  1. Add SSL support

    Brendan Molloy authored
  2. Add SSL support (correctly, this time.)

    Brendan Molloy authored
This page is out of date. Refresh to see the latest.
Showing with 12 additions and 4 deletions.
  1. +1 −1 
  2. +6 −3
  3. +5 −0 phenny
2 
@@ -34,7 +34,7 @@ def run_phenny(config):
def connect(config):
p = bot.Phenny(config)
-, config.port)
+, config.port, config.ssl)
try: Watcher()
except Exception, e:
@@ -64,15 +64,18 @@ def safe(input):
self.__write(args, text)
except Exception, e: pass
- def run(self, host, port=6667):
- self.initiate_connect(host, port)
+ def run(self, host, port=6667, ssl=False):
+ self.initiate_connect(host, port, ssl)
- def initiate_connect(self, host, port):
+ def initiate_connect(self, host, port, ssl):
if self.verbose:
message = 'Connecting to %s:%s...' % (host, port)
print >> sys.stderr, message,
self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
self.connect((host, port))
+ if ssl:
+ import ssl
+ self.socket = ssl.wrap_socket(self.socket)
try: asyncore.loop()
except KeyboardInterrupt:
5 phenny
@@ -27,6 +27,8 @@ def create_default_config(fn):
print >> f, trim("""\
nick = 'phenny'
host = ''
+ port = 6667
+ ssl = False
channels = ['#example', '#test']
owner = 'yournickname'
@@ -135,6 +137,9 @@ def main(argv=None):
if not hasattr(module, 'port'):
module.port = 6667
+ if not hasattr(module, 'ssl'):
+ module.ssl = False
if not hasattr(module, 'password'):
module.password = None
Something went wrong with that request. Please try again.