Make enabling take an optional argument
This commit is contained in:
parent
626e0696f1
commit
965c117935
1 changed files with 14 additions and 4 deletions
18
rowbot
18
rowbot
|
@ -741,12 +741,22 @@ hook_cmd_markov() {
|
|||
|
||||
case $action in
|
||||
enable)
|
||||
enabled[$to]=yes
|
||||
privmsg "$to" "now recording $to"
|
||||
if (( ${#action_args[@]} )); then
|
||||
enabled[${action_args[0]}]=yes
|
||||
privmsg "$to" "now recording ${action_args[0]}"
|
||||
else
|
||||
enabled[$to]=yes
|
||||
privmsg "$to" "now recording $to"
|
||||
fi
|
||||
;;
|
||||
disable)
|
||||
enabled[$to]=no
|
||||
privmsg "$to" "no longer recording $to"
|
||||
if (( ${#action_args[@]} )); then
|
||||
enabled[${action_args[0]}]=no
|
||||
privmsg "$to" "no longer recording ${action_args[0]}"
|
||||
else
|
||||
enabled[$to]=yes
|
||||
privmsg "$to" "no longer recording $to"
|
||||
fi
|
||||
;;
|
||||
enabled\?)
|
||||
if [[ ${to:0:1} != \# || ${enabled[$to]} = yes ]]; then
|
||||
|
|
Loading…
Reference in a new issue