diff --git a/protocols/inspircd.py b/protocols/inspircd.py index ebf37d3..96907e1 100644 --- a/protocols/inspircd.py +++ b/protocols/inspircd.py @@ -346,6 +346,18 @@ class InspIRCdProtocol(TS6BaseProtocol): else: self._send_with_prefix(self.sid, 'PUSH %s ::%s %s %s %s' % (target, source, numeric, target, text)) + def invite(self, source, target, channel): + """Sends an INVITE from a PyLink client.""" + if not self.is_internal_client(source): + raise LookupError('No such PyLink client exists.') + + if self.proto_ver >= 1205: # insp3 + # Note: insp3 supports optionally sending an invite expiration (after the TS argument), + # but we don't use / expose that feature yet. + self._send_with_prefix(source, 'INVITE %s %s %d' % (target, channel, self._channels[channel].ts)) + else: # insp2 + self._send_with_prefix(source, 'INVITE %s %s' % (target, channel)) + def away(self, source, text): """Sends an AWAY message from a PyLink client. can be an empty string to unset AWAY status.""" diff --git a/protocols/ircs2s_common.py b/protocols/ircs2s_common.py index 286223a..da9d80f 100644 --- a/protocols/ircs2s_common.py +++ b/protocols/ircs2s_common.py @@ -352,7 +352,7 @@ class IRCS2SProtocol(IRCCommonProtocol): return [sender, command, parsed_args] def invite(self, source, target, channel): - """Sends an INVITE from a PyLink client..""" + """Sends an INVITE from a PyLink client.""" if not self.is_internal_client(source): raise LookupError('No such PyLink client exists.')