diff options
| author | Jokler <jokler.contact@gmail.com> | 2018-06-16 21:33:52 +0200 |
|---|---|---|
| committer | Jokler <jokler.contact@gmail.com> | 2018-06-16 21:33:52 +0200 |
| commit | d5cef711a3bd637e56eae3363b7ebb8fb709d449 (patch) | |
| tree | e0dd197d0583bc3207103403fe2cedafd7307381 | |
| parent | aabd685967dcc5d077b072350637b6464e608885 (diff) | |
| download | frippy-d5cef711a3bd637e56eae3363b7ebb8fb709d449.tar.gz frippy-d5cef711a3bd637e56eae3363b7ebb8fb709d449.zip | |
Tell: Fix tell accept condition
This fixes a mistake from the previous commit
to the tell plugin.
| -rw-r--r-- | src/plugins/tell/mod.rs | 14 |
1 files 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<T: Database> Tell<T> { 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<T: Database> Tell<T> { .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(); |
