diff options
| author | Max Audron <audron@cocaine.farm> | 2021-09-07 14:03:52 +0200 |
|---|---|---|
| committer | Max Audron <audron@cocaine.farm> | 2021-09-07 14:03:52 +0200 |
| commit | e5e5ef8b6b4cfa57537d3dcde45028a32b4d0a68 (patch) | |
| tree | 47bc87d39507b00b6aadcb655c1478d4ee153d84 /src | |
| parent | add stuff to ignore for git and containers (diff) | |
add about command
Diffstat (limited to '')
| -rw-r--r-- | src/hooks/mod.rs | 18 | ||||
| -rw-r--r-- | src/main.rs | 5 |
2 files changed, 20 insertions, 3 deletions
diff --git a/src/hooks/mod.rs b/src/hooks/mod.rs index ee64643..e62fc93 100644 --- a/src/hooks/mod.rs +++ b/src/hooks/mod.rs @@ -3,13 +3,25 @@ extern crate rand; use anyhow::Result; use irc::client::prelude::*; -pub mod sed; pub mod intensify; -pub mod shifty_eyes; pub mod pet; +pub mod sed; +pub mod shifty_eyes; -pub use shifty_eyes::shifty_eyes; pub use intensify::intensify; +pub use shifty_eyes::shifty_eyes; + +pub fn about(bot: &crate::Bot, msg: Message) { + bot.send_privmsg( + msg.response_target().unwrap(), + &format!( + "{name} is {name} - https://gitlab.com/cocainefarm/gnulag/catinator", + name = bot.config.user.nickname + ) + .to_string(), + ) + .unwrap(); +} pub fn sasl(bot: &crate::Bot, msg: Message) -> Result<()> { match msg.command { diff --git a/src/main.rs b/src/main.rs index dc128cd..9ab7f6c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -47,5 +47,10 @@ async fn main() { "Pet the cat, cats generally like pets.", catinator::hooks::pet::pet ), + command( + "about", + "Prints some info about this kitty cat", + catinator::hooks::about + ), ]; } |
