diff --git a/examples/simple.rs b/examples/simple.rs index 5aedd34..6dc1cc3 100644 --- a/examples/simple.rs +++ b/examples/simple.rs @@ -24,7 +24,7 @@ fn main() { if message.command[] == "PRIVMSG" { if let Some(msg) = message.suffix { if msg.contains("pickles") { - server.send_action(message.args[0][], "Hi!").unwrap(); + server.send_privmsg(message.args[0][], "Hi!").unwrap(); } } } diff --git a/src/data/config.rs b/src/data/config.rs index ade9db4..e494f74 100644 --- a/src/data/config.rs +++ b/src/data/config.rs @@ -185,6 +185,7 @@ mod test { use_ssl: Some(false), encoding: Some(format!("UTF-8")), channels: Some(vec![format!("#test"), format!("#test2")]), + user_info: None, options: Some(HashMap::new()), }; assert_eq!(Config::load(Path::new("config.json")), Ok(cfg)); @@ -205,6 +206,7 @@ mod test { use_ssl: Some(false), encoding: Some(format!("UTF-8")), channels: Some(vec![format!("#test"), format!("#test2")]), + user_info: None, options: Some(HashMap::new()), }; assert_eq!(Config::load_utf8("config.json"), Ok(cfg)); diff --git a/src/server/mod.rs b/src/server/mod.rs index c6c50c9..1bd74dd 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -449,20 +449,6 @@ mod test { assert_eq!(levels.len(), exp.access_levels().len()); } - #[test] - #[cfg(feature = "ctcp")] - fn finger_response() { - let value = "test!test@test PRIVMSG test :\u{001}FINGER\u{001}\r\n"; - let server = IrcServer::from_connection(test_config(), Connection::new( - MemReader::new(value.as_bytes().to_vec()), NullWriter - )); - for message in server.iter() { - println!("{}", message); - } - assert_eq!(get_server_value(server)[], "NOTICE test :\u{001}FINGER :test (test)\u{001}\ - \r\n"); - } - #[test] #[cfg(feature = "ctcp")] fn finger_response() { diff --git a/src/server/utils.rs b/src/server/utils.rs index 63c0408..59b7cf8 100644 --- a/src/server/utils.rs +++ b/src/server/utils.rs @@ -471,19 +471,6 @@ mod test { "PRIVMSG test :\u{001}MESSAGE\u{001}\r\n"); } - #[test] - #[cfg(feature = "ctcp")] - fn send_ctcp() { - let server = IrcServer::from_connection(test_config(), - Connection::new(NullReader, MemWriter::new())); - { - let wrapper = Wrapper::new(&server); - wrapper.send_ctcp("test", "MESSAGE").unwrap(); - } - assert_eq!(get_server_value(server)[], - "PRIVMSG test :\u{001}MESSAGE\u{001}\r\n"); - } - #[test] #[cfg(feature = "ctcp")] fn send_action() {