3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 04:02:45 +01:00

protocols: respect serverdesc config options in spawnServer

This commit is contained in:
James Lu 2015-09-04 18:59:57 -07:00
parent 759f6c4492
commit 72cfe04904
2 changed files with 4 additions and 2 deletions

View File

@ -425,10 +425,11 @@ def handle_events(irc, data):
if parsed_args is not None:
return [numeric, command, parsed_args]
def spawnServer(irc, name, sid=None, uplink=None, desc='PyLink Server'):
def spawnServer(irc, name, sid=None, uplink=None, desc=None):
# -> :0AL SERVER test.server * 1 0AM :some silly pseudoserver
uplink = uplink or irc.sid
name = name.lower()
desc = desc or irc.serverdata.get('serverdesc') or irc.botdata['serverdesc']
if sid is None: # No sid given; generate one!
irc.sidgen = utils.TS6SIDGenerator(irc.serverdata["sidrange"])
sid = irc.sidgen.next_sid()

View File

@ -575,10 +575,11 @@ def handle_events(irc, data):
if parsed_args is not None:
return [numeric, command, parsed_args]
def spawnServer(irc, name, sid=None, uplink=None, desc='PyLink Server'):
def spawnServer(irc, name, sid=None, uplink=None, desc=None):
# -> :0AL SID test.server 1 0XY :some silly pseudoserver
uplink = uplink or irc.sid
name = name.lower()
desc = desc or irc.serverdata.get('serverdesc') or irc.botdata['serverdesc']
if sid is None: # No sid given; generate one!
irc.sidgen = utils.TS6SIDGenerator(irc.serverdata["sidrange"])
sid = irc.sidgen.next_sid()