diff options
author | Till Hoeppner | 2015-06-12 00:00:27 +0200 |
---|---|---|
committer | Till Hoeppner | 2015-06-12 00:00:27 +0200 |
commit | f4d8b1a521c567ccc8e2470299287b063e0d5926 (patch) | |
tree | 94e42220872de101ae67a26ee9243cd6e4731386 /src/format/weechat3.rs | |
parent | 6073cd55e7ac0419bcb80bec3c57f2c2409fee02 (diff) | |
download | ilc-f4d8b1a521c567ccc8e2470299287b063e0d5926.tar.gz ilc-f4d8b1a521c567ccc8e2470299287b063e0d5926.tar.xz ilc-f4d8b1a521c567ccc8e2470299287b063e0d5926.zip |
Add semi-proper conversion
Diffstat (limited to 'src/format/weechat3.rs')
-rw-r--r-- | src/format/weechat3.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/format/weechat3.rs b/src/format/weechat3.rs index 20ee1dd..9e07e92 100644 --- a/src/format/weechat3.rs +++ b/src/format/weechat3.rs @@ -84,7 +84,7 @@ impl<'a, R: 'a> Iterator for Iter<'a, R> where R: BufRead { reason: Some(strip_one(&rejoin(reason, &split_tokens[7..])).into()), }, time: parse_time(&self.context, date, time), - channel: None + channel: self.context.channel.clone().map(Into::into) })), [date, time, "--", notice, content..] if notice.starts_with("Notice(") @@ -94,13 +94,13 @@ impl<'a, R: 'a> Iterator for Iter<'a, R> where R: BufRead { content: rejoin(content, &split_tokens[4..]), }, time: parse_time(&self.context, date, time), - channel: None + channel: self.context.channel.clone().map(Into::into) })), [date, time, "--", "irc:", "disconnected", "from", "server", _..] => return Some(Ok(Event { ty: Type::Disconnect, time: parse_time(&self.context, date, time), - channel: None + channel: self.context.channel.clone().map(Into::into) })), [date, time, "--", nick, verb, "now", "known", "as", new_nick] if verb == "is" || verb == "are" @@ -110,7 +110,7 @@ impl<'a, R: 'a> Iterator for Iter<'a, R> where R: BufRead { new_nick: new_nick.to_owned().into() }, time: parse_time(&self.context, date, time), - channel: None + channel: self.context.channel.clone().map(Into::into) })), [date, time, sp, "*", nick, msg..] if sp.clone().is_empty() @@ -120,7 +120,7 @@ impl<'a, R: 'a> Iterator for Iter<'a, R> where R: BufRead { content: rejoin(msg, &split_tokens[5..]), }, time: parse_time(&self.context, date, time), - channel: None + channel: self.context.channel.clone().map(Into::into) })), [date, time, nick, msg..] => return Some(Ok(Event { @@ -129,7 +129,7 @@ impl<'a, R: 'a> Iterator for Iter<'a, R> where R: BufRead { content: rejoin(msg, &split_tokens[3..]), }, time: parse_time(&self.context, date, time), - channel: None + channel: self.context.channel.clone().map(Into::into) })), _ => () } |