mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
p10: implement outgoing knock() as a wrapper over NOTICE
This commit is contained in:
parent
2df608307d
commit
f64976b1ed
@ -411,8 +411,12 @@ class P10Protocol(IRCS2SProtocol):
|
|||||||
self._send_with_prefix(numeric, 'D %s :Killed (%s)' % (target, reason))
|
self._send_with_prefix(numeric, 'D %s :Killed (%s)' % (target, reason))
|
||||||
self._remove_client(target)
|
self._remove_client(target)
|
||||||
|
|
||||||
def knock(self, numeric, target, text):
|
def knock(self, source, target, text):
|
||||||
raise NotImplementedError('KNOCK is not supported on P10.')
|
"""KNOCK wrapper for P10: notifies chanops that someone wants to join
|
||||||
|
the channel."""
|
||||||
|
prefix = '%' if 'h' in self.prefixmodes else '@'
|
||||||
|
self.notice(self.pseudoclient.uid, prefix + target,
|
||||||
|
"Knock from %s: %s" % (self.get_friendly_name(source), text))
|
||||||
|
|
||||||
def message(self, source, target, text, _notice=False):
|
def message(self, source, target, text, _notice=False):
|
||||||
"""Sends a PRIVMSG from a PyLink client or server."""
|
"""Sends a PRIVMSG from a PyLink client or server."""
|
||||||
|
Loading…
Reference in New Issue
Block a user