Skip to content

Commit

Permalink
moved ipaddress to connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandru Stan committed Mar 21, 2010
1 parent 04c524d commit 4ae6eba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pyscripts/plugins/ircbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
'Main': {
'enable': 'yes',
'part_message': 'XSBS - eXtensible SauerBraten Server',
'ipaddress': '0',
},
'Connection': {
'server': 'irc.gamesurge.net',
'port': '6667',
'nickname': 'xsbs-newbot',
'channel': '#xsbs-newserver'
'ipaddress': '0',
},
'Features': {
'message_gateway': 'yes',
Expand Down Expand Up @@ -118,10 +118,10 @@ def __init__(self, nickname, channels):
self.bots = []
self.reconnect_count = 0
def doConnect(self):
if config['Main']['ipaddress'] == '0':
if config['Connection']['ipaddress'] == '0':
reactor.connectTCP(config['Connection']['server'], int(config['Connection']['port']), factory)
else:
reactor.connectTCP(config['Connection']['server'], int(config['Connection']['port']), factory, 30, (config['Main']['ipaddress'], 0))
reactor.connectTCP(config['Connection']['server'], int(config['Connection']['port']), factory, 30, (config['Connection']['ipaddress'], 0))
def doReconnect(self):
if self.reconnect_count < 5:
self.reconnect_count += 1
Expand Down

0 comments on commit 4ae6eba

Please sign in to comment.