mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-25 19:54:25 +01:00
Merge branch 'master' into devel
Conflicts: plugins/automode.py protocols/clientbot.py
This commit is contained in:
commit
f27b179211
@ -106,18 +106,19 @@ def match(irc, channel, uids=None):
|
|||||||
log.debug("(%s) automode: Filtered mode list of %s to %s (protocol:%s)",
|
log.debug("(%s) automode: Filtered mode list of %s to %s (protocol:%s)",
|
||||||
irc.name, modes, outgoing_modes, irc.protoname)
|
irc.name, modes, outgoing_modes, irc.protoname)
|
||||||
|
|
||||||
# If the Automode bot is missing, send the mode through the PyLink server.
|
if outgoing_modes:
|
||||||
if modebot_uid not in irc.users:
|
# If the Automode bot is missing, send the mode through the PyLink server.
|
||||||
modebot_uid = irc.sid
|
if modebot_uid not in irc.users:
|
||||||
|
modebot_uid = irc.sid
|
||||||
|
|
||||||
log.debug("(%s) automode: sending modes from modebot_uid %s",
|
log.debug("(%s) automode: sending modes from modebot_uid %s",
|
||||||
irc.name, modebot_uid)
|
irc.name, modebot_uid)
|
||||||
|
|
||||||
irc.mode(modebot_uid, channel, outgoing_modes)
|
irc.mode(modebot_uid, channel, outgoing_modes)
|
||||||
|
|
||||||
# Create a hook payload to support plugins like relay.
|
# Create a hook payload to support plugins like relay.
|
||||||
irc.call_hooks([modebot_uid, 'AUTOMODE_MODE',
|
irc.call_hooks([modebot_uid, 'AUTOMODE_MODE',
|
||||||
{'target': channel, 'modes': outgoing_modes, 'parse_as': 'MODE'}])
|
{'target': channel, 'modes': outgoing_modes, 'parse_as': 'MODE'}])
|
||||||
|
|
||||||
def handle_join(irc, source, command, args):
|
def handle_join(irc, source, command, args):
|
||||||
"""
|
"""
|
||||||
|
@ -97,7 +97,7 @@ def remote(irc, source, args):
|
|||||||
try:
|
try:
|
||||||
remoteirc = world.networkobjects[netname]
|
remoteirc = world.networkobjects[netname]
|
||||||
except KeyError: # Unknown network.
|
except KeyError: # Unknown network.
|
||||||
irc.error('No such network "%s" (case sensitive).' % netname)
|
irc.error('No such network %r (case sensitive).' % netname)
|
||||||
REMOTE_IN_USE.clear()
|
REMOTE_IN_USE.clear()
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -105,6 +105,10 @@ def remote(irc, source, args):
|
|||||||
irc.error('Unknown service %r.' % args.service)
|
irc.error('Unknown service %r.' % args.service)
|
||||||
REMOTE_IN_USE.clear()
|
REMOTE_IN_USE.clear()
|
||||||
return
|
return
|
||||||
|
elif not remoteirc.connected.is_set():
|
||||||
|
irc.error('Network %r is not connected.' % netname)
|
||||||
|
REMOTE_IN_USE.clear()
|
||||||
|
return
|
||||||
|
|
||||||
# Force remoteirc.called_in to something private in order to prevent
|
# Force remoteirc.called_in to something private in order to prevent
|
||||||
# accidental information leakage from replies.
|
# accidental information leakage from replies.
|
||||||
|
Loading…
Reference in New Issue
Block a user