Only create znc config for valid users
This commit is contained in:
parent
6a4087525a
commit
e4cded77b7
|
@ -90,8 +90,13 @@ function add_user_irc_bouncer {
|
|||
is_admin='false'
|
||||
fi
|
||||
|
||||
if [[ $(is_valid_user "$new_username") == "0" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
read_config_param IRC_PORT
|
||||
read_config_param DEFAULT_DOMAIN_NAME
|
||||
read_config_param IRC_PASSWORD
|
||||
|
||||
stop_irc_bouncer
|
||||
|
||||
|
@ -130,7 +135,6 @@ function add_user_irc_bouncer {
|
|||
echo ' </Network>' >> /home/znc/.znc/config/znc.conf
|
||||
echo '</User>' >> /home/znc/.znc/config/znc.conf
|
||||
|
||||
mkdir -p /home/znc/.znc/moddata/webadmin
|
||||
mkdir -p /home/znc/.znc/users/${new_username}/moddata
|
||||
mkdir -p /home/znc/.znc/users/${new_username}/networks
|
||||
mkdir /home/znc/.znc/users/${new_username}/moddata/chanserver
|
||||
|
@ -140,6 +144,8 @@ function add_user_irc_bouncer {
|
|||
mkdir -p /home/znc/.znc/users/${new_username}/networks/${PROJECT_NAME}/moddata/chansaver
|
||||
mkdir -p /home/znc/.znc/users/${new_username}/networks/${PROJECT_NAME}/moddata/simple_away
|
||||
|
||||
mkdir -p /home/znc/.znc/moddata/webadmin
|
||||
|
||||
chown -R znc:znc /home/znc/.znc
|
||||
|
||||
start_irc_bouncer
|
||||
|
|
Loading…
Reference in New Issue