mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-11 20:52:42 +01:00
Merge branch 'staging' into devel
This commit is contained in:
commit
03b53aee59
2
.mailmap
Normal file
2
.mailmap
Normal file
@ -0,0 +1,2 @@
|
||||
James Lu <GLolol@overdrivenetworks.com> <GLolol1@hotmail.com>
|
||||
James Lu <GLolol@overdrivenetworks.com> <GLolol@overdrive.pw>
|
@ -50,6 +50,8 @@ class Irc():
|
||||
self.connected = threading.Event()
|
||||
self.aborted = threading.Event()
|
||||
|
||||
self.initVars()
|
||||
|
||||
if world.testing:
|
||||
# HACK: Don't thread if we're running tests.
|
||||
self.connect()
|
||||
@ -162,7 +164,6 @@ class Irc():
|
||||
__init__ in a separate thread to allow multiple concurrent connections.
|
||||
"""
|
||||
while True:
|
||||
self.initVars()
|
||||
ip = self.serverdata["ip"]
|
||||
port = self.serverdata["port"]
|
||||
checks_ok = True
|
||||
@ -296,6 +297,9 @@ class Irc():
|
||||
log.debug('(%s) _disconnect: Setting self.aborted to True.', self.name)
|
||||
self.aborted.set()
|
||||
|
||||
log.debug('(%s) disconnect: Clearing state via initVars().', self.name)
|
||||
self.initVars()
|
||||
|
||||
log.debug('(%s) Removing channel logging handlers due to disconnect.', self.name)
|
||||
while self.loghandlers:
|
||||
log.removeHandler(self.loghandlers.pop())
|
||||
|
10
utils.py
10
utils.py
@ -214,12 +214,18 @@ def parseModes(irc, target, args):
|
||||
args = args[1:]
|
||||
if usermodes:
|
||||
log.debug('(%s) Using irc.umodes for this query: %s', irc.name, irc.umodes)
|
||||
assert target in irc.users, "Unknown user %r." % target
|
||||
|
||||
if target not in irc.users:
|
||||
log.warning('(%s) Possible desync! Mode target %s is not in the users index.', irc.name, target)
|
||||
|
||||
supported_modes = irc.umodes
|
||||
oldmodes = irc.users[target].modes
|
||||
else:
|
||||
log.debug('(%s) Using irc.cmodes for this query: %s', irc.name, irc.cmodes)
|
||||
assert target in irc.channels, "Unknown channel %r." % target
|
||||
|
||||
if target not in irc.channels:
|
||||
log.warning('(%s) Possible desync! Mode target %s is not in the channels index.', irc.name, target)
|
||||
|
||||
supported_modes = irc.cmodes
|
||||
oldmodes = irc.channels[target].modes
|
||||
res = []
|
||||
|
Loading…
Reference in New Issue
Block a user