mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
unreal: add incoming/outgoing INVITE support
This commit is contained in:
parent
89e515f513
commit
2ddb72f9ec
@ -220,6 +220,11 @@ class UnrealProtocol(TS6BaseProtocol):
|
||||
else:
|
||||
raise NotImplementedError("Changing field %r of a client is unsupported by this protocol." % field)
|
||||
|
||||
def inviteClient(self, numeric, target, channel):
|
||||
"""Sends an INVITE from a PyLink client.."""
|
||||
if not utils.isInternalClient(self.irc, numeric):
|
||||
raise LookupError('No such PyLink client exists.')
|
||||
self._send(numeric, 'INVITE %s %s' % (target, channel))
|
||||
|
||||
### HANDLERS
|
||||
|
||||
@ -609,4 +614,12 @@ class UnrealProtocol(TS6BaseProtocol):
|
||||
self.irc.users[target].realname = newgecos = args[1]
|
||||
return {'target': target, 'newgecos': newgecos}
|
||||
|
||||
def handle_invite(self, numeric, command, args):
|
||||
"""Handles incoming INVITEs."""
|
||||
# <- :GL INVITE PyLink-devel :#a
|
||||
target = self._getNick(args[0])
|
||||
channel = args[1].lower()
|
||||
# We don't actually need to process this; it's just something plugins/hooks can use
|
||||
return {'target': target, 'channel': channel}
|
||||
|
||||
Class = UnrealProtocol
|
||||
|
Loading…
Reference in New Issue
Block a user