aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/factoids/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/factoids/mod.rs')
-rw-r--r--src/plugins/factoids/mod.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/factoids/mod.rs b/src/plugins/factoids/mod.rs
index f857f85..252ba83 100644
--- a/src/plugins/factoids/mod.rs
+++ b/src/plugins/factoids/mod.rs
@@ -140,8 +140,10 @@ impl<T: Database> Factoids<T> {
}
};
+ let message = factoid.content.replace("\n", "|").replace("\r", "");
+
server.send_privmsg(&command.target,
- &format!("{}: {}", factoid.name, factoid.content))
+ &format!("{}: {}", factoid.name, message))
}
fn info(&self, server: &IrcServer, command: &PluginCommand) -> Result<(), IrcError> {
@@ -156,7 +158,7 @@ impl<T: Database> Factoids<T> {
};
match count {
- 0 => server.send_privmsg(&command.target, &format!("{} does not exist", name)),
+ 0 => server.send_notice(&command.source, &format!("{} does not exist", name)),
1 => {
server.send_privmsg(&command.target,
&format!("There is 1 version of {}", name))