diff options
Diffstat (limited to 'src/hooks')
| -rw-r--r-- | src/hooks/intensify.rs | 17 | ||||
| -rw-r--r-- | src/hooks/mod.rs | 3 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/hooks/intensify.rs b/src/hooks/intensify.rs new file mode 100644 index 0000000..87a4edf --- /dev/null +++ b/src/hooks/intensify.rs @@ -0,0 +1,17 @@ +use anyhow::Result; +use irc::client::prelude::*; +use macros::privmsg; + +pub fn intensify(bot: &crate::Bot, msg: Message) -> Result<()> { + privmsg!(msg, { + let mut chars = text.chars(); + chars.next(); + chars.next_back(); + let content = chars.as_str(); + + bot.send_privmsg( + msg.response_target().unwrap(), + format!("\x02\x0304[\x1d{} INTENSIFIES\x1d]\x03\x0F", content.to_uppercase()).as_str(), + )?; + }) +} diff --git a/src/hooks/mod.rs b/src/hooks/mod.rs index ba4a98d..49ec0ab 100644 --- a/src/hooks/mod.rs +++ b/src/hooks/mod.rs @@ -2,10 +2,11 @@ use anyhow::Result; use irc::client::prelude::*; pub mod sed; +pub mod intensify; pub mod shifty_eyes; -pub use sed::*; pub use shifty_eyes::shifty_eyes; +pub use intensify::intensify; pub fn sasl(bot: &crate::Bot, msg: Message) -> Result<()> { match msg.command { |
