This commit is contained in:
Bob Mottram 2016-10-28 18:57:35 +01:00
parent 12f251462e
commit bc7301c747
1 changed files with 4 additions and 6 deletions

View File

@ -107,10 +107,8 @@ function add_user_irc_bouncer {
stop_irc_bouncer
new_user_salt_base1="$(create_password 20)"
new_user_salt_base2=$(echo "$new_user_salt_base1" | sed "s|#|.|g")
new_user_salt=$(echo "$new_user_salt_base2" | sed "s|#|.|g")
new_user_hash=$(echo "${new_user_password}${new_user_salt}" | sha256sum | awk -F ' ' '{print $1}')
ZNC_SALT="$(dd if=/dev/urandom bs=16c count=1 | md5sum | awk '{print $1}')"
new_user_hash=$(echo "${new_user_password}${ZNC_SALT}" | sha256sum | awk -F ' ' '{print $1}')
echo "<User ${new_username}>" >> /home/znc/.znc/configs/znc.conf
#new_user_pass="sha256#${new_user_hash}#${new_user_salt}#"
@ -139,8 +137,8 @@ function add_user_irc_bouncer {
echo ' LoadModule = perform' >> /home/znc/.znc/configs/znc.conf
echo ' LoadModule = simple_away' >> /home/znc/.znc/configs/znc.conf
echo '' >> /home/znc/.znc/configs/znc.conf
echo " Server = ${DEFAULT_DOMAIN_NAME} +${IRC_PORT} ${new_user_password}" >> /home/znc/.znc/configs/znc.conf
echo " Server = ${IRC_ONION_HOSTNAME} +${IRC_PORT} ${new_user_password}" >> /home/znc/.znc/configs/znc.conf
echo " Server = ${DEFAULT_DOMAIN_NAME} +${IRC_PORT}" >> /home/znc/.znc/configs/znc.conf
echo " Server = ${IRC_ONION_HOSTNAME} +${IRC_PORT}" >> /home/znc/.znc/configs/znc.conf
echo '' >> /home/znc/.znc/configs/znc.conf
echo " <Chan ${PROJECT_NAME}>" >> /home/znc/.znc/configs/znc.conf
echo ' </Chan>' >> /home/znc/.znc/configs/znc.conf