Merge pull request #178 from jesopo/develop
Don't send an empty CTCP SOURCE response
This commit is contained in:
commit
4edb99f000
1 changed files with 2 additions and 4 deletions
|
@ -550,8 +550,7 @@ impl ClientState {
|
||||||
self.send_ctcp_internal(
|
self.send_ctcp_internal(
|
||||||
resp,
|
resp,
|
||||||
&format!("SOURCE {}", self.config().source()),
|
&format!("SOURCE {}", self.config().source()),
|
||||||
)?;
|
)
|
||||||
self.send_ctcp_internal(resp, "SOURCE")
|
|
||||||
} else if tokens[0].eq_ignore_ascii_case("PING") && tokens.len() > 1 {
|
} else if tokens[0].eq_ignore_ascii_case("PING") && tokens.len() > 1 {
|
||||||
self.send_ctcp_internal(resp, &format!("PING {}", tokens[1]))
|
self.send_ctcp_internal(resp, &format!("PING {}", tokens[1]))
|
||||||
} else if tokens[0].eq_ignore_ascii_case("TIME") {
|
} else if tokens[0].eq_ignore_ascii_case("TIME") {
|
||||||
|
@ -1299,8 +1298,7 @@ mod test {
|
||||||
}).unwrap();
|
}).unwrap();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
&get_client_value(client)[..],
|
&get_client_value(client)[..],
|
||||||
"NOTICE test :\u{001}SOURCE https://github.com/aatxe/irc\u{001}\r\n\
|
"NOTICE test :\u{001}SOURCE https://github.com/aatxe/irc\u{001}\r\n"
|
||||||
NOTICE test :\u{001}SOURCE\u{001}\r\n"
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue