mirror of
https://github.com/jlu5/PyLink.git
synced 2025-12-02 07:27:22 +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.connected = threading.Event()
|
||||||
self.aborted = threading.Event()
|
self.aborted = threading.Event()
|
||||||
|
|
||||||
|
self.initVars()
|
||||||
|
|
||||||
if world.testing:
|
if world.testing:
|
||||||
# HACK: Don't thread if we're running tests.
|
# HACK: Don't thread if we're running tests.
|
||||||
self.connect()
|
self.connect()
|
||||||
@ -162,7 +164,6 @@ class Irc():
|
|||||||
__init__ in a separate thread to allow multiple concurrent connections.
|
__init__ in a separate thread to allow multiple concurrent connections.
|
||||||
"""
|
"""
|
||||||
while True:
|
while True:
|
||||||
self.initVars()
|
|
||||||
ip = self.serverdata["ip"]
|
ip = self.serverdata["ip"]
|
||||||
port = self.serverdata["port"]
|
port = self.serverdata["port"]
|
||||||
checks_ok = True
|
checks_ok = True
|
||||||
@ -296,6 +297,9 @@ class Irc():
|
|||||||
log.debug('(%s) _disconnect: Setting self.aborted to True.', self.name)
|
log.debug('(%s) _disconnect: Setting self.aborted to True.', self.name)
|
||||||
self.aborted.set()
|
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)
|
log.debug('(%s) Removing channel logging handlers due to disconnect.', self.name)
|
||||||
while self.loghandlers:
|
while self.loghandlers:
|
||||||
log.removeHandler(self.loghandlers.pop())
|
log.removeHandler(self.loghandlers.pop())
|
||||||
|
|||||||
10
utils.py
10
utils.py
@ -214,12 +214,18 @@ def parseModes(irc, target, args):
|
|||||||
args = args[1:]
|
args = args[1:]
|
||||||
if usermodes:
|
if usermodes:
|
||||||
log.debug('(%s) Using irc.umodes for this query: %s', irc.name, irc.umodes)
|
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
|
supported_modes = irc.umodes
|
||||||
oldmodes = irc.users[target].modes
|
oldmodes = irc.users[target].modes
|
||||||
else:
|
else:
|
||||||
log.debug('(%s) Using irc.cmodes for this query: %s', irc.name, irc.cmodes)
|
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
|
supported_modes = irc.cmodes
|
||||||
oldmodes = irc.channels[target].modes
|
oldmodes = irc.channels[target].modes
|
||||||
res = []
|
res = []
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user