From 524f7a036a9eaadc698a5a57c60b9e8cd4003322 Mon Sep 17 00:00:00 2001 From: Jokler Date: Sat, 16 Jun 2018 16:53:08 +0200 Subject: Tell: Allow messages to online users Since the userlists desync after a while it is not guaranteed that users are actually online when they appear to be. --- src/plugins/tell/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/tell/mod.rs b/src/plugins/tell/mod.rs index 225373e..6510c2d 100644 --- a/src/plugins/tell/mod.rs +++ b/src/plugins/tell/mod.rs @@ -50,7 +50,8 @@ impl Tell { || receiver.eq_ignore_ascii_case(&sender) { online.push(receiver); - continue; + // TODO Change this when https://github.com/aatxe/irc/issues/136 gets resolved + // continue; } let channels = client @@ -176,7 +177,8 @@ impl Tell { } fn help(&self) -> &str { - "usage: tell user message\r\n\ + "Used to send messages to offline users which they will receive when they come online.\r\n + usage: tell user message\r\n\ example: tell Foobar Hello!" } } @@ -186,6 +188,7 @@ impl Plugin for Tell { let res = match message.command { Command::JOIN(_, _, _) => self.send_tells(client, message.source_nickname().unwrap()), Command::NICK(ref nick) => self.send_tells(client, nick), + Command::PRIVMSG(ref nick, _) => self.send_tells(client, nick), Command::Response(resp, ref chan_info, _) => { if resp == Response::RPL_NAMREPLY { debug!("NAMREPLY info: {:?}", chan_info); -- cgit v1.2.3-70-g09d2