From d5cef711a3bd637e56eae3363b7ebb8fb709d449 Mon Sep 17 00:00:00 2001 From: Jokler Date: Sat, 16 Jun 2018 21:33:52 +0200 Subject: Tell: Fix tell accept condition This fixes a mistake from the previous commit to the tell plugin. --- src/plugins/tell/mod.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/plugins/tell/mod.rs b/src/plugins/tell/mod.rs index 6510c2d..07b2478 100644 --- a/src/plugins/tell/mod.rs +++ b/src/plugins/tell/mod.rs @@ -49,9 +49,10 @@ impl Tell { if receiver.eq_ignore_ascii_case(client.current_nickname()) || receiver.eq_ignore_ascii_case(&sender) { - online.push(receiver); - // TODO Change this when https://github.com/aatxe/irc/issues/136 gets resolved - // continue; + if !online.contains(&receiver) { + online.push(receiver); + } + continue; } let channels = client @@ -72,8 +73,11 @@ impl Tell { .map(find_receiver) .any(|option| option.is_some()) { - online.push(receiver); - continue; + if !online.contains(&receiver) { + online.push(receiver); + } + // TODO Change this when https://github.com/aatxe/irc/issues/136 gets resolved + //continue; } let tm = time::now().to_timespec(); -- cgit v1.2.3-70-g09d2