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

protocols: spawnClient -> spawn_client

This commit is contained in:
James Lu 2017-06-30 21:25:58 -07:00
parent ea455436c1
commit f60dc8fa37
7 changed files with 10 additions and 10 deletions

View File

@ -87,7 +87,7 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
self._cap_timer.start() self._cap_timer.start()
# This is a really gross hack to get the defined NICK/IDENT/HOST/GECOS. # This is a really gross hack to get the defined NICK/IDENT/HOST/GECOS.
# But this connection stuff is done before any of the spawnClient stuff in # But this connection stuff is done before any of the spawn_client stuff in
# services_support fires. # services_support fires.
self.conf_nick = self.serverdata.get('pylink_nick') or conf.conf["bot"].get("nick", "PyLink") self.conf_nick = self.serverdata.get('pylink_nick') or conf.conf["bot"].get("nick", "PyLink")
f('NICK %s' % (self.conf_nick)) f('NICK %s' % (self.conf_nick))
@ -96,7 +96,7 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
conf.conf["bot"].get("realname", "PyLink Clientbot"))) conf.conf["bot"].get("realname", "PyLink Clientbot")))
# Note: clientbot clients are initialized with umode +i by default # Note: clientbot clients are initialized with umode +i by default
def spawnClient(self, nick, ident='unknown', host='unknown.host', realhost=None, modes={('i', None)}, def spawn_client(self, nick, ident='unknown', host='unknown.host', realhost=None, modes={('i', None)},
server=None, ip='0.0.0.0', realname='', ts=None, opertype=None, server=None, ip='0.0.0.0', realname='', ts=None, opertype=None,
manipulatable=False): manipulatable=False):
""" """
@ -108,7 +108,7 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
ts = ts or int(time.time()) ts = ts or int(time.time())
log.debug('(%s) spawnClient stub called, saving nick %s as PUID %s', self.name, nick, uid) log.debug('(%s) spawn_client stub called, saving nick %s as PUID %s', self.name, nick, uid)
u = self.users[uid] = IrcUser(nick, ts, uid, server, ident=ident, host=host, realname=realname, u = self.users[uid] = IrcUser(nick, ts, uid, server, ident=ident, host=host, realname=realname,
manipulatable=manipulatable, realhost=realhost, ip=ip) manipulatable=manipulatable, realhost=realhost, ip=ip)
self.servers[server].users.add(uid) self.servers[server].users.add(uid)
@ -351,7 +351,7 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
log.debug('(%s) Nick-colliding virtual client %s/%s', self.name, idsource, nick) log.debug('(%s) Nick-colliding virtual client %s/%s', self.name, idsource, nick)
self.call_hooks([self.sid, 'CLIENTBOT_NICKCOLLIDE', {'target': idsource, 'parse_as': 'SAVE'}]) self.call_hooks([self.sid, 'CLIENTBOT_NICKCOLLIDE', {'target': idsource, 'parse_as': 'SAVE'}])
idsource = self.spawnClient(nick, ident or 'unknown', host or 'unknown', idsource = self.spawn_client(nick, ident or 'unknown', host or 'unknown',
server=self.uplink, realname=FALLBACK_REALNAME).uid server=self.uplink, realname=FALLBACK_REALNAME).uid
return idsource return idsource

View File

@ -85,7 +85,7 @@ class HybridProtocol(TS6Protocol):
# send endburst now # send endburst now
self.send(':%s EOB' % (self.sid,)) self.send(':%s EOB' % (self.sid,))
def spawnClient(self, nick, ident='null', host='null', realhost=None, modes=set(), def spawn_client(self, nick, ident='null', host='null', realhost=None, modes=set(),
server=None, ip='0.0.0.0', realname=None, ts=None, opertype=None, server=None, ip='0.0.0.0', realname=None, ts=None, opertype=None,
manipulatable=False): manipulatable=False):
""" """

View File

@ -33,7 +33,7 @@ class InspIRCdProtocol(TS6BaseProtocol):
### Outgoing commands ### Outgoing commands
def spawnClient(self, nick, ident='null', host='null', realhost=None, modes=set(), def spawn_client(self, nick, ident='null', host='null', realhost=None, modes=set(),
server=None, ip='0.0.0.0', realname=None, ts=None, opertype='IRC Operator', server=None, ip='0.0.0.0', realname=None, ts=None, opertype='IRC Operator',
manipulatable=False): manipulatable=False):
""" """

View File

@ -240,7 +240,7 @@ class P10Protocol(IRCS2SProtocol):
### COMMANDS ### COMMANDS
def spawnClient(self, nick, ident='null', host='null', realhost=None, modes=set(), def spawn_client(self, nick, ident='null', host='null', realhost=None, modes=set(),
server=None, ip='0.0.0.0', realname=None, ts=None, opertype='IRC Operator', server=None, ip='0.0.0.0', realname=None, ts=None, opertype='IRC Operator',
manipulatable=False): manipulatable=False):
""" """

View File

@ -40,7 +40,7 @@ class RatboxProtocol(TS6Protocol):
'*A': '', '*B': '', '*C': '', '*D': 'igoabcCdfklrsuwxyzZD' '*A': '', '*B': '', '*C': '', '*D': 'igoabcCdfklrsuwxyzZD'
} }
def spawnClient(self, nick, ident='null', host='null', realhost=None, modes=set(), def spawn_client(self, nick, ident='null', host='null', realhost=None, modes=set(),
server=None, ip='0.0.0.0', realname=None, ts=None, opertype=None, server=None, ip='0.0.0.0', realname=None, ts=None, opertype=None,
manipulatable=False): manipulatable=False):
""" """

View File

@ -27,7 +27,7 @@ class TS6Protocol(TS6BaseProtocol):
### OUTGOING COMMANDS ### OUTGOING COMMANDS
def spawnClient(self, nick, ident='null', host='null', realhost=None, modes=set(), def spawn_client(self, nick, ident='null', host='null', realhost=None, modes=set(),
server=None, ip='0.0.0.0', realname=None, ts=None, opertype='IRC Operator', server=None, ip='0.0.0.0', realname=None, ts=None, opertype='IRC Operator',
manipulatable=False): manipulatable=False):
""" """

View File

@ -56,7 +56,7 @@ class UnrealProtocol(TS6BaseProtocol):
return uid return uid
### OUTGOING COMMAND FUNCTIONS ### OUTGOING COMMAND FUNCTIONS
def spawnClient(self, nick, ident='null', host='null', realhost=None, modes=set(), def spawn_client(self, nick, ident='null', host='null', realhost=None, modes=set(),
server=None, ip='0.0.0.0', realname=None, ts=None, opertype='IRC Operator', server=None, ip='0.0.0.0', realname=None, ts=None, opertype='IRC Operator',
manipulatable=False): manipulatable=False):
""" """