From 82a520cd3e019d946ef4444df5604b0c942f3556 Mon Sep 17 00:00:00 2001 From: GLolol Date: Sun, 20 Oct 2013 10:36:09 -0700 Subject: [PATCH] LinkRelay: must be in channel to use nicks --- LinkRelay/plugin.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/LinkRelay/plugin.py b/LinkRelay/plugin.py index 284d89a..74762e4 100644 --- a/LinkRelay/plugin.py +++ b/LinkRelay/plugin.py @@ -377,7 +377,11 @@ class LinkRelay(callbacks.Plugin): for relay in self.relays: if relay.sourceChannel == channel and \ relay.sourceNetwork == irc.network: - if not relay.hasTargetIRC: + # Little security function here to prevent spies :P + if msg.nick not in irc.state.channels[channel].users: + irc.error(_('You are not in the channel specified.')) + break + elif not relay.hasTargetIRC: irc.reply(_('I haven\'t scraped the IRC object for %s ' 'yet. Try again in a minute or two.') % \ relay.targetNetwork)