diff options
| author | Jokler <jokler.contact@gmail.com> | 2019-12-07 20:50:32 +0100 |
|---|---|---|
| committer | Jokler <jokler.contact@gmail.com> | 2019-12-07 20:50:32 +0100 |
| commit | b74b1915d9c64894bb8c2d310879d0047bb87d00 (patch) | |
| tree | 77755addafb2942bad02199dc0c01c87cf3f99e5 /src | |
| parent | fc622ed40c866de5d6dfe3a8015d261ad2246c61 (diff) | |
| download | frippy-b74b1915d9c64894bb8c2d310879d0047bb87d00.tar.gz frippy-b74b1915d9c64894bb8c2d310879d0047bb87d00.zip | |
Tell: Filter duplicate receivers
Diffstat (limited to 'src')
| -rw-r--r-- | src/plugins/tell/mod.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/tell/mod.rs b/src/plugins/tell/mod.rs index 5fe4bd1..73d1ac2 100644 --- a/src/plugins/tell/mod.rs +++ b/src/plugins/tell/mod.rs @@ -7,6 +7,7 @@ use irc::client::prelude::*; use chrono::NaiveDateTime; use humantime::format_duration; use std::time::Duration; +use itertools::Itertools; use time; use crate::plugin::*; @@ -48,6 +49,7 @@ impl<T: Database, C: FrippyClient> Tell<T, C> { let receivers = command.tokens[0] .split(',') .filter(|&s| !s.is_empty()) + .unique() .collect::<Vec<_>>(); let sender = command.source; |
