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:
commit
d531201850
@ -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.
|
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
|
## Dependencies
|
||||||
|
|
||||||
|
@ -152,9 +152,9 @@ def kick(irc, source, args):
|
|||||||
|
|
||||||
@utils.add_cmd
|
@utils.add_cmd
|
||||||
def kill(irc, source, args):
|
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)
|
utils.checkAuthenticated(irc, source, allowOper=False)
|
||||||
try:
|
try:
|
||||||
sourcenick = args[0]
|
sourcenick = args[0]
|
||||||
|
@ -184,7 +184,15 @@ class InspIRCdProtocol(TS6BaseProtocol):
|
|||||||
(not self.irc.isInternalServer(numeric)):
|
(not self.irc.isInternalServer(numeric)):
|
||||||
raise LookupError('No such PyLink client/server exists.')
|
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
|
# We only need to call removeClient here if the target is one of our
|
||||||
# clients, since any remote servers will send a QUIT from
|
# clients, since any remote servers will send a QUIT from
|
||||||
|
Loading…
Reference in New Issue
Block a user