irclib.py: Fix SASL on py3k

This commit is contained in:
nyuszika7h 2013-02-03 15:08:36 +01:00
parent ff1d9c4f69
commit f1198fb4e8
1 changed files with 2 additions and 1 deletions

View File

@ -906,7 +906,8 @@ class Irc(IrcCommandDispatcher):
if not self.sasl_username:
log.error('SASL username is not set, unable to identify.')
else:
auth_string = base64.b64encode('%s\x00%s\x00%s' % (self.sasl_username,
auth_string =
base64.b64encode('%s\x00%s\x00%s'.encode('utf-8') % (self.sasl_username,
self.sasl_username, self.sasl_password))
log.debug('Sending CAP REQ command, requesting capability \'sasl\'.')
self.queueMsg(ircmsgs.IrcMsg(command="CAP", args=('REQ', 'sasl')))