aboutsummaryrefslogtreecommitdiff
path: root/src/format/weechat3.rs
diff options
context:
space:
mode:
authorTill Hoeppner2015-06-09 00:18:31 +0200
committerTill Hoeppner2015-06-09 00:18:31 +0200
commit9c63c4b89ea0fd889f7f0fd1da71684511e6620e (patch)
treeb50c0598f3aae17f2ab6e8ffad9ef0ba21d6838f /src/format/weechat3.rs
parentcd182daf35eae3739511f3751843ad01f0d489b3 (diff)
downloadilc-9c63c4b89ea0fd889f7f0fd1da71684511e6620e.tar.gz
ilc-9c63c4b89ea0fd889f7f0fd1da71684511e6620e.tar.xz
ilc-9c63c4b89ea0fd889f7f0fd1da71684511e6620e.zip
Add basic frequency counter binary
Diffstat (limited to 'src/format/weechat3.rs')
-rw-r--r--src/format/weechat3.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/format/weechat3.rs b/src/format/weechat3.rs
index 59bb072..f319ace 100644
--- a/src/format/weechat3.rs
+++ b/src/format/weechat3.rs
@@ -1,4 +1,4 @@
-use std::io::{ self, BufRead, Write };
+use std::io::{ BufRead, Write };
use std::borrow::ToOwned;
use std::iter::{ Iterator };
@@ -58,6 +58,10 @@ impl<R> Iterator for Iter<R> where R: BufRead {
nick: nick.to_owned(), channel: channel.to_owned(), mask: mask(host),
reason: mask(&join(reason, &split_tokens[8..])), time: timestamp(date, time)
})),
+ [date, time, "<--", nick, host, "has", "quit", reason..] => return Some(Ok(Event::Quit {
+ nick: nick.to_owned(), mask: mask(host),
+ reason: mask(&join(reason, &split_tokens[7..])), time: timestamp(date, time)
+ })),
[date, time, "--", notice, content..]
if notice.starts_with("Notice(")
=> return Some(Ok(Event::Notice {
@@ -68,6 +72,11 @@ impl<R> Iterator for Iter<R> where R: BufRead {
[date, time, "--", "irc:", "disconnected", "from", "server", _..] => return Some(Ok(Event::Disconnect {
time: timestamp(date, time)
})),
+ [date, time, "--", nick, verb, "now", "known", "as", new_nick]
+ if verb == "is" || verb == "are"
+ => return Some(Ok(Event::Nick {
+ old: nick.to_owned(), new: new_nick.to_owned(), time: timestamp(date, time)
+ })),
[date, time, sp, "*", nick, msg..]
if sp.is_empty()
=> return Some(Ok(Event::Action {