diff tests/src/plugins/history/main.cpp @ 636:152d20dc0e74

Irccd: rename plugin::on_ to plugin::handle_, closes #769 @10m
author David Demelier <markand@malikania.fr>
date Thu, 15 Mar 2018 12:56:26 +0100
parents 27587ff92a64
children 3e816cebed2c
line wrap: on
line diff
--- a/tests/src/plugins/history/main.cpp	Wed Mar 14 14:08:34 2018 +0100
+++ b/tests/src/plugins/history/main.cpp	Thu Mar 15 12:56:26 2018 +0100
@@ -48,7 +48,7 @@
             config.emplace("file", CMAKE_CURRENT_SOURCE_DIR "/words.conf");
 
         plugin_->set_config(config);
-        plugin_->on_load(irccd_);
+        plugin_->handle_load(irccd_);
     }
 };
 
@@ -58,7 +58,7 @@
 {
     load({{"file", CMAKE_CURRENT_SOURCE_DIR "/broken-conf.json"}});
 
-    plugin_->on_command(irccd_, {server_, "jean!jean@localhost", "#history", "seen francis"});
+    plugin_->handle_command(irccd_, {server_, "jean!jean@localhost", "#history", "seen francis"});
 
     auto cmd = server_->cqueue().front();
 
@@ -74,8 +74,8 @@
     remove(CMAKE_CURRENT_BINARY_DIR "/seen.json");
     load({{ "file", CMAKE_CURRENT_BINARY_DIR "/seen.json" }});
 
-    plugin_->on_message(irccd_, {server_, "jean!jean@localhost", "#history", "hello"});
-    plugin_->on_command(irccd_, {server_, "destructor!dst@localhost", "#history", "seen jean"});
+    plugin_->handle_message(irccd_, {server_, "jean!jean@localhost", "#history", "hello"});
+    plugin_->handle_command(irccd_, {server_, "destructor!dst@localhost", "#history", "seen jean"});
 
     auto cmd = server_->cqueue().front();
 
@@ -91,8 +91,8 @@
     remove(CMAKE_CURRENT_BINARY_DIR "/said.json");
     load({{ "file", CMAKE_CURRENT_BINARY_DIR "/said.json" }});
 
-    plugin_->on_message(irccd_, {server_, "jean!jean@localhost", "#history", "hello"});
-    plugin_->on_command(irccd_, {server_, "destructor!dst@localhost", "#history", "said jean"});
+    plugin_->handle_message(irccd_, {server_, "jean!jean@localhost", "#history", "hello"});
+    plugin_->handle_command(irccd_, {server_, "destructor!dst@localhost", "#history", "said jean"});
 
     auto cmd = server_->cqueue().front();
 
@@ -106,8 +106,8 @@
     remove(CMAKE_CURRENT_BINARY_DIR "/unknown.json");
     load({{ "file", CMAKE_CURRENT_BINARY_DIR "/unknown.json" }});
 
-    plugin_->on_message(irccd_, {server_, "jean!jean@localhost", "#history", "hello"});
-    plugin_->on_command(irccd_, {server_, "destructor!dst@localhost", "#history", "seen nobody"});
+    plugin_->handle_message(irccd_, {server_, "jean!jean@localhost", "#history", "hello"});
+    plugin_->handle_command(irccd_, {server_, "destructor!dst@localhost", "#history", "seen nobody"});
 
     auto cmd = server_->cqueue().front();
 
@@ -123,10 +123,10 @@
     remove(CMAKE_CURRENT_BINARY_DIR "/case.json");
     load({{"file", CMAKE_CURRENT_BINARY_DIR "/case.json"}});
 
-    plugin_->on_message(irccd_, {server_, "JeaN!JeaN@localhost", "#history", "hello"});
+    plugin_->handle_message(irccd_, {server_, "JeaN!JeaN@localhost", "#history", "hello"});
 
     // Full caps.
-    plugin_->on_command(irccd_, {server_, "destructor!dst@localhost", "#HISTORY", "said JEAN"});
+    plugin_->handle_command(irccd_, {server_, "destructor!dst@localhost", "#HISTORY", "said JEAN"});
 
     auto cmd = server_->cqueue().front();
 
@@ -135,7 +135,7 @@
     BOOST_REQUIRE(std::regex_match(cmd["message"].get<std::string>(), rule));
 
     // Random caps.
-    plugin_->on_command(irccd_, {server_, "destructor!dst@localhost", "#HiSToRy", "said JeaN"});
+    plugin_->handle_command(irccd_, {server_, "destructor!dst@localhost", "#HiSToRy", "said JeaN"});
 
     cmd = server_->cqueue().back();