3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

Merge branch 'master' into devel

Conflicts:
	plugins/automode.py
	protocols/clientbot.py
This commit is contained in:
James Lu 2017-09-05 18:57:24 -07:00
commit f27b179211
2 changed files with 15 additions and 10 deletions

View File

@ -106,18 +106,19 @@ def match(irc, channel, uids=None):
log.debug("(%s) automode: Filtered mode list of %s to %s (protocol:%s)",
irc.name, modes, outgoing_modes, irc.protoname)
# If the Automode bot is missing, send the mode through the PyLink server.
if modebot_uid not in irc.users:
modebot_uid = irc.sid
if outgoing_modes:
# If the Automode bot is missing, send the mode through the PyLink server.
if modebot_uid not in irc.users:
modebot_uid = irc.sid
log.debug("(%s) automode: sending modes from modebot_uid %s",
irc.name, modebot_uid)
log.debug("(%s) automode: sending modes from modebot_uid %s",
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.
irc.call_hooks([modebot_uid, 'AUTOMODE_MODE',
{'target': channel, 'modes': outgoing_modes, 'parse_as': 'MODE'}])
# Create a hook payload to support plugins like relay.
irc.call_hooks([modebot_uid, 'AUTOMODE_MODE',
{'target': channel, 'modes': outgoing_modes, 'parse_as': 'MODE'}])
def handle_join(irc, source, command, args):
"""

View File

@ -97,7 +97,7 @@ def remote(irc, source, args):
try:
remoteirc = world.networkobjects[netname]
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()
return
@ -105,6 +105,10 @@ def remote(irc, source, args):
irc.error('Unknown service %r.' % args.service)
REMOTE_IN_USE.clear()
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
# accidental information leakage from replies.