3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-01-11 20:52:42 +01:00

Merge branch 'master' into devel

This commit is contained in:
James Lu 2016-02-27 17:47:55 -08:00
commit d531201850
3 changed files with 12 additions and 4 deletions

View File

@ -10,7 +10,7 @@ PyLink is an extensible, plugin-based IRC services framework written in Python.
Please report any bugs you find to the [issue tracker](https://github.com/GLolol/PyLink/issues). Pull requests are open if you'd like to contribute, though new stuff generally goes to the **devel** branch.
You can also find support via our IRC channel: `#PyLink at irc.overdrivenetworks.com` ([webchat](https://webchat.overdrivenetworks.com/?channels=PyLink,dev)). Ask your questions and be patient for a response.
You can also find support via our IRC channels: `#PyLink @ irc.overdrivenetworks.com `([webchat](https://webchat.overdrivenetworks.com/?channels=PyLink,dev)) or `#PyLink @ chat.freenode.net`. Ask your questions and be patient for a response.
## Dependencies

View File

@ -152,9 +152,9 @@ def kick(irc, source, args):
@utils.add_cmd
def kill(irc, source, args):
"""<source> <channel> <user> [<reason>]
"""<source> <target> [<reason>]
Admin only. Kills <user> via <source>, where <source> is either the nick of a PyLink client or the SID of a PyLink server."""
Admin only. Kills <target> via <source>, where <source> is either the nick of a PyLink client or the SID of a PyLink server."""
utils.checkAuthenticated(irc, source, allowOper=False)
try:
sourcenick = args[0]

View File

@ -184,7 +184,15 @@ class InspIRCdProtocol(TS6BaseProtocol):
(not self.irc.isInternalServer(numeric)):
raise LookupError('No such PyLink client/server exists.')
self._send(numeric, 'KILL %s :%s' % (target, reason))
# InspIRCd will show the raw kill message sent from our server as the quit message.
# So, make the kill look actually like a kill instead of someone quitting with
# an arbitrary message.
if target in self.irc.servers:
sourcenick = self.irc.servers[numeric].name
else:
sourcenick = self.irc.users[numeric].nick
self._send(numeric, 'KILL %s :Killed (%s (%s))' % (target, sourcenick, reason))
# We only need to call removeClient here if the target is one of our
# clients, since any remote servers will send a QUIT from