Skip to content

Commit

Permalink
fix first-time channel list
Browse files Browse the repository at this point in the history
  • Loading branch information
thepaul committed May 20, 2011
1 parent a16772e commit 3dafa5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cassbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ def __init__(self, desc, nickname='cassbot', init_channels=(), reactor=None,
self.statefile = statefile or self.default_statefile
self.state = {
'nickname': nickname,
'channels': init_channels,
'channels': set(init_channels),
'cmd_prefix': None,
'plugins': {},
}
Expand Down Expand Up @@ -757,7 +757,7 @@ def leave(self, channelname, reason=None):

def initialize_proto_state(self, proto):
proto.nickname = self.state['nickname']
proto.join_channels = self.state.get('channels', set())
proto.join_channels = self.state.setdefault('channels', set())
proto.cmd_prefix = self.state.get('cmd_prefix', None)
proto.service = self

Expand Down

0 comments on commit 3dafa5e

Please sign in to comment.