Added a bounds check on handle_ctcp.
This commit is contained in:
parent
79afdeb134
commit
85e30e6f9f
1 changed files with 1 additions and 0 deletions
|
@ -399,6 +399,7 @@ impl IrcServer {
|
|||
/// Handles CTCP requests if the CTCP feature is enabled.
|
||||
#[cfg(feature = "ctcp")]
|
||||
fn handle_ctcp(&self, resp: &str, tokens: Vec<&str>) -> Result<()> {
|
||||
if (tokens.len() == 0) { return Ok(()) }
|
||||
match tokens[0] {
|
||||
"FINGER" => self.send_ctcp_internal(resp, &format!(
|
||||
"FINGER :{} ({})", self.config().real_name(), self.config().username()
|
||||
|
|
Loading…
Reference in a new issue