Add a default configuration for rowbot
This commit is contained in:
parent
c1c0e5b90b
commit
05df40fb82
1 changed files with 15 additions and 2 deletions
17
rowbot
17
rowbot
|
@ -14,7 +14,7 @@ while (( $# )); do
|
|||
;;
|
||||
--no-*)
|
||||
key=${1#--no-}
|
||||
opts[$key]=false
|
||||
opts[$key]=no
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
|
@ -22,7 +22,7 @@ while (( $# )); do
|
|||
;;
|
||||
--*)
|
||||
key=${1#--}
|
||||
opts[$key]=true
|
||||
opts[$key]=yes
|
||||
;;
|
||||
*)
|
||||
break
|
||||
|
@ -30,3 +30,16 @@ while (( $# )); do
|
|||
|
||||
shift
|
||||
done
|
||||
|
||||
###
|
||||
# default config
|
||||
##
|
||||
|
||||
server=${opts[server]:-irc.libera.chat}
|
||||
tls=${opts[tls]:-no}
|
||||
|
||||
if [[ tls = no ]]; then
|
||||
port=${opts[port]:-6667}
|
||||
else
|
||||
port=${opts[port]:-6697}
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue