mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-24 03:29:28 +01:00
Merge branch 'master' into devel
Conflicts: plugins/networks.py
This commit is contained in:
commit
8969cfb74e
@ -1,7 +1,7 @@
|
||||
"""Networks plugin - allows you to manipulate connections to various configured networks."""
|
||||
import threading
|
||||
|
||||
from pylinkirc import utils, world
|
||||
from pylinkirc import utils, world, conf, classes
|
||||
from pylinkirc.log import log
|
||||
|
||||
@utils.add_cmd
|
||||
@ -45,15 +45,9 @@ def connect(irc, source, args):
|
||||
return
|
||||
if network.connection_thread.is_alive():
|
||||
irc.reply('Error: Network "%s" seems to be already connected.' % netname)
|
||||
else: # Reconnect the network!
|
||||
network.connection_thread = threading.Thread(target=network.connect)
|
||||
network.connection_thread.start()
|
||||
|
||||
# And the plugins we have too.
|
||||
for plugin in world.plugins.values():
|
||||
if hasattr(plugin, 'main'):
|
||||
log.debug('(%s) Calling main() function of plugin %r', irc.name, plugin)
|
||||
plugin.main(irc)
|
||||
else: # Recreate the IRC object.
|
||||
proto = utils.getProtocolModule(network.serverdata.get("protocol"))
|
||||
world.networkobjects[netname] = classes.Irc(netname, proto, conf.conf)
|
||||
|
||||
irc.reply("Done.")
|
||||
|
||||
|
@ -1127,6 +1127,7 @@ def handle_mode(irc, numeric, command, args):
|
||||
reversed_modes = irc.reverseModes(target, modes, oldobj=oldchan)
|
||||
log.debug('(%s) relay.handle_mode: Reversing mode changes of %r with %r (CLAIM).',
|
||||
irc.name, modes, reversed_modes)
|
||||
if reversed_modes:
|
||||
irc.proto.mode(irc.sid, target, reversed_modes)
|
||||
break
|
||||
|
||||
|
@ -627,7 +627,11 @@ class TS6Protocol(TS6BaseProtocol):
|
||||
Note: The core of WHOIS handling is done by coreplugin.py
|
||||
(IRCd-independent), and not here."""
|
||||
# <- :42XAAAAAB WHOIS 5PYAAAAAA :pylink-devel
|
||||
return {'target': args[0]}
|
||||
# First argument is the server that should reply to the WHOIS request
|
||||
# or the server hosting the UID given. We can safely assume that any
|
||||
# WHOIS commands received are for US, since we can't host any servers
|
||||
# behind us to route it to.
|
||||
return {'target': self.irc.nickToUid(args[-1])}
|
||||
|
||||
def handle_472(self, numeric, command, args):
|
||||
"""Handles the incoming 472 numeric.
|
||||
|
Loading…
Reference in New Issue
Block a user