Skip to content

Commit

Permalink
Fix JID error if joining room with spaces in name
Browse files Browse the repository at this point in the history
  • Loading branch information
1stvamp committed Sep 15, 2011
1 parent f39eeed commit 5afee99
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hippybot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ def __init__(self, config):
self.PING_FREQUENCY = 60

prefix = config['connection']['username'].split('_')[0]
self._channels = ["%s_%s@%s" % (prefix, c.strip(), 'conf.hipchat.com')
for c in config['connection']['channels'].split('\n')]
self._channels = ["%s_%s@%s" % (prefix, c.strip().lower().replace(' ',
'_'), 'conf.hipchat.com') for c in
config['connection']['channels'].split('\n')]

username = "%s@chat.hipchat.com" % (config['connection']['username'],)
# Set this here as JabberBot sets username as private
Expand Down

0 comments on commit 5afee99

Please sign in to comment.