New function and module to allow users in the allowList to change the bot's nick
This commit is contained in:
parent
b483424d8f
commit
cce7ef88dc
2
bot.sh
2
bot.sh
@ -6,6 +6,8 @@ if [ "$(whoami)" = "root" ]; then
|
||||
fi
|
||||
[ -f functions.sh ] && source functions.sh
|
||||
[ -f bot.cfg ] && source bot.cfg
|
||||
export allowList
|
||||
export ignoreList
|
||||
input=".botinput"
|
||||
|
||||
close_bot() {
|
||||
|
@ -11,6 +11,13 @@ shift
|
||||
echo -en "${msg}$@\r\n" | tee -a "$input"
|
||||
}
|
||||
|
||||
nick()
|
||||
{
|
||||
local msg="NICK $1"
|
||||
shift
|
||||
echo -en "${msg}\r\n" | tee -a "$input"
|
||||
}
|
||||
|
||||
reply()
|
||||
{
|
||||
shift
|
||||
|
8
modules/nick/nick.sh
Executable file
8
modules/nick/nick.sh
Executable file
@ -0,0 +1,8 @@
|
||||
[ -f functions.sh ] && source functions.sh
|
||||
|
||||
user=$1
|
||||
shift
|
||||
shift
|
||||
if [[ "$user" =~ $allowList ]]; then
|
||||
nick $1
|
||||
fi
|
Loading…
Reference in New Issue
Block a user