Add 'sauce' command
This commit is contained in:
parent
a31d029e14
commit
bbe1eb8bda
|
@ -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.
|
||||
|
|
1
helpdoc
1
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 -
|
||||
|
|
8
miid
8
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
|
||||
|
|
Reference in New Issue