From bbe1eb8bda1d02d298c8650247342d8d714e9283 Mon Sep 17 00:00:00 2001 From: Jaidyn Ann Date: Wed, 19 May 2021 23:10:05 -0500 Subject: [PATCH] Add 'sauce' command --- README.md | 8 +++++--- helpdoc | 1 + miid | 8 ++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 23b38fd..205de4f 100644 --- a/README.md +++ b/README.md @@ -8,13 +8,15 @@ Use [ii](https://tools.suckless.org/ii/) to connect to your IRC server and channel of choice― make sure to set up the nick and everything. Then, you can just run miid every time the channel's output is updated: - $ miid irc/$IRC_NETWORK/$IRC_CHANNEL $BOT_NICK + + `$ miid irc/$IRC_NETWORK/$IRC_CHANNEL $BOT_NICK` It helps to have inotifywait installed, so this can be done automatically: - $ while inotifywait -e close_write irc/$IRC_NETWORK/$IRC_CHANNEL/out; \ + + `$ while inotifywait -e close_write irc/$IRC_NETWORK/$IRC_CHANNEL/out; \ do \ sh miid irc/$IRC_NETWORK/$IRC_CHANNEL/ $BOT_NICK; \ - done + done` ## Commands Check the ./helpdoc. diff --git a/helpdoc b/helpdoc index 167a392..99562aa 100644 --- a/helpdoc +++ b/helpdoc @@ -39,6 +39,7 @@ There are also some some commands that you issue to me as a message, e.g., "narrator: help". . - pronouns [femme/masc] +- sauce - help . - END OF TRANSMISSION - diff --git a/miid b/miid index f3ec5e7..a34a873 100644 --- a/miid +++ b/miid @@ -576,6 +576,12 @@ function help_command { fi } +function sauce_command { + local user="$1" + msg "$user, you can find my secret sauce at https://github.com/JadedCtrl/miid." + msg "… just, be careful, OK?" +} + function pronouns_command { local user="$1" local args="$2" @@ -756,6 +762,8 @@ function bot_command_parse { if test "$command" = "help"; then help_command "$user" "$args" + elif test "$command" = "sauce"; then + sauce_command "$user" "$args" elif test "$command" = "pronouns"; then pronouns_command "$user" "$args" fi