summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugin.rs11
-rw-r--r--src/plugins/currency.rs1
2 files changed, 10 insertions, 2 deletions
diff --git a/src/plugin.rs b/src/plugin.rs
index e0a4ce2..fb35668 100644
--- a/src/plugin.rs
+++ b/src/plugin.rs
@@ -98,6 +98,10 @@ impl ThreadedPlugins {
// Send the message to the plugin if the plugin needs it
if lock_plugin!(plugin).is_allowed(server, &message) {
+ debug!("Executing {} with {}",
+ name,
+ message.to_string().replace("\r\n", ""));
+
// Clone everything before the move
// The server uses an Arc internally too
let plugin = Arc::clone(&plugin);
@@ -114,7 +118,10 @@ impl ThreadedPlugins {
}
}
- pub fn handle_command(&mut self, server: &IrcServer, mut command: PluginCommand) -> Result<(), IrcError> {
+ pub fn handle_command(&mut self,
+ server: &IrcServer,
+ mut command: PluginCommand)
+ -> Result<(), IrcError> {
if !command.tokens.iter().any(|s| !s.is_empty()) {
let help = format!("Use \"{} help\" to get help", server.current_nickname());
@@ -127,6 +134,8 @@ impl ThreadedPlugins {
// The first token contains the name of the plugin
let name = command.tokens.remove(0);
+ debug!("Sending command \"{:?}\" to {}", command, name);
+
// Clone for the move - the server uses an Arc internally
let server = server.clone();
let plugin = Arc::clone(plugin);
diff --git a/src/plugins/currency.rs b/src/plugins/currency.rs
index 78ae593..4ba2531 100644
--- a/src/plugins/currency.rs
+++ b/src/plugins/currency.rs
@@ -1,7 +1,6 @@
extern crate reqwest;
extern crate serde;
extern crate serde_json;
-extern crate regex;
use std::io::Read;
use std::num::ParseFloatError;