diff --git a/code/nel/src/misc/i18n.cpp b/code/nel/src/misc/i18n.cpp index e53750af7..8aaa8df6e 100644 --- a/code/nel/src/misc/i18n.cpp +++ b/code/nel/src/misc/i18n.cpp @@ -323,23 +323,6 @@ bool CI18N::parseLabel(ucstring::const_iterator &it, ucstring::const_iterator &l ucstring::const_iterator rewind = it; label.erase(); - // first char must be A-Za-z@_ - if (it != last && - ( - (*it >= '0' && *it <= '9') - || (*it >= 'A' && *it <= 'Z') - || (*it >= 'a' && *it <= 'z') - || (*it == '_') - || (*it == '@') - ) - ) - label.push_back(char(*it++)); - else - { - it = rewind; - return false; - } - // other char must be [0-9A-Za-z@_]* while (it != last && ( diff --git a/code/ryzom/server/shard.screen.rc b/code/ryzom/server/shard.screen.rc index 5d7dab6d1..f58dd1371 100644 --- a/code/ryzom/server/shard.screen.rc +++ b/code/ryzom/server/shard.screen.rc @@ -16,58 +16,62 @@ hardstatus alwayslastline "%w" chdir $RYZOM_PATH/server -screen -t aes /bin/sh service_launcher.sh aes $RYZOM_PATH/../build/bin/ryzom_admin_service -A. -C. -L. --nobreak --fulladminname=admin_executor_service --shortadminname=AES +screen -t aes /bin/sh ../tools/scripts/linux/service_launcher.sh aes $RYZOM_PATH/../build/bin/ryzom_admin_service -A. -C. -L. --nobreak --fulladminname=admin_executor_service --shortadminname=AES # bms_master -screen -t bms_master /bin/sh service_launcher.sh bms_master $RYZOM_PATH/../build/bin/ryzom_backup_service -C. -L. --nobreak --writepid -P49990 +screen -t bms_master /bin/sh ../tools/scripts/linux/service_launcher.sh bms_master $RYZOM_PATH/../build/bin/ryzom_backup_service -C. -L. --nobreak --writepid -P49990 # bms_pd_master -#screen -t bms_pd_master /bin/sh service_launcher.sh bms_pd_master $RYZOM_PATH/../build/bin/ryzom_backup_service -C. -L. --nobreak --writepid -P49992 +#screen -t bms_pd_master /bin/sh ../tools/scripts/linux/service_launcher.sh bms_pd_master $RYZOM_PATH/../build/bin/ryzom_backup_service -C. -L. --nobreak --writepid -P49992 # egs -screen -t egs /bin/sh service_launcher.sh egs $RYZOM_PATH/../build/bin/ryzom_entities_game_service -C. -L. --nobreak --writepid +screen -t egs /bin/sh ../tools/scripts/linux/service_launcher.sh egs $RYZOM_PATH/../build/bin/ryzom_entities_game_service -C. -L. --nobreak --writepid # gpms -screen -t gpms /bin/sh service_launcher.sh gpms $RYZOM_PATH/../build/bin/ryzom_gpm_service -C. -L. --nobreak --writepid +screen -t gpms /bin/sh ../tools/scripts/linux/service_launcher.sh gpms $RYZOM_PATH/../build/bin/ryzom_gpm_service -C. -L. --nobreak --writepid # ios -screen -t ios /bin/sh service_launcher.sh ios $RYZOM_PATH/../build/bin/ryzom_ios_service -C. -L. --nobreak --writepid +screen -t ios /bin/sh ../tools/scripts/linux/service_launcher.sh ios $RYZOM_PATH/../build/bin/ryzom_ios_service -C. -L. --nobreak --writepid # rns -screen -t rns /bin/sh service_launcher.sh rns $RYZOM_PATH/../build/bin/ryzom_naming_service -C. -L. --nobreak --writepid +screen -t rns /bin/sh ../tools/scripts/linux/service_launcher.sh rns $RYZOM_PATH/../build/bin/ryzom_naming_service -C. -L. --nobreak --writepid # rws -screen -t rws /bin/sh service_launcher.sh rws $RYZOM_PATH/../build/bin/ryzom_welcome_service -C. -L. --nobreak --writepid +screen -t rws /bin/sh ../tools/scripts/linux/service_launcher.sh rws $RYZOM_PATH/../build/bin/ryzom_welcome_service -C. -L. --nobreak --writepid # ts -screen -t ts /bin/sh service_launcher.sh ts $RYZOM_PATH/../build/bin/ryzom_tick_service -C. -L. --nobreak --writepid +screen -t ts /bin/sh ../tools/scripts/linux/service_launcher.sh ts $RYZOM_PATH/../build/bin/ryzom_tick_service -C. -L. --nobreak --writepid # ms -screen -t ms /bin/sh service_launcher.sh ms $RYZOM_PATH/../build/bin/ryzom_mirror_service -C. -L. --nobreak --writepid +screen -t ms /bin/sh ../tools/scripts/linux/service_launcher.sh ms $RYZOM_PATH/../build/bin/ryzom_mirror_service -C. -L. --nobreak --writepid # ais_newbyland -screen -t ais_newbyland /bin/sh service_launcher.sh ais_newbyland $RYZOM_PATH/../build/bin/ryzom_ai_service -C. -L. --nobreak --writepid -mCommon:Newbieland:Post +screen -t ais_newbyland /bin/sh ../tools/scripts/linux/service_launcher.sh ais_newbyland $RYZOM_PATH/../build/bin/ryzom_ai_service -C. -L. --nobreak --writepid -mCommon:Newbieland:Post # mfs -screen -t mfs /bin/sh service_launcher.sh mfs $RYZOM_PATH/../build/bin/ryzom_mail_forum_service -C. -L. --nobreak --writepid +screen -t mfs /bin/sh ../tools/scripts/linux/service_launcher.sh mfs $RYZOM_PATH/../build/bin/ryzom_mail_forum_service -C. -L. --nobreak --writepid # su -screen -t su /bin/sh service_launcher.sh su $RYZOM_PATH/../build/bin/ryzom_shard_unifier_service -C. -L. --nobreak --writepid +screen -t su /bin/sh ../tools/scripts/linux/service_launcher.sh su $RYZOM_PATH/../build/bin/ryzom_shard_unifier_service -C. -L. --nobreak --writepid # fes -screen -t fes /bin/sh service_launcher.sh fes $RYZOM_PATH/../build/bin/ryzom_frontend_service -C. -L. --nobreak --writepid +screen -t fes /bin/sh ../tools/scripts/linux/service_launcher.sh fes $RYZOM_PATH/../build/bin/ryzom_frontend_service -C. -L. --nobreak --writepid # sbs -screen -t sbs /bin/sh service_launcher.sh sbs $RYZOM_PATH/../build/bin/ryzom_session_browser_service -C. -L. --nobreak --writepid +screen -t sbs /bin/sh ../tools/scripts/linux/service_launcher.sh sbs $RYZOM_PATH/../build/bin/ryzom_session_browser_service -C. -L. --nobreak --writepid # lgs -screen -t lgs /bin/sh service_launcher.sh lgs $RYZOM_PATH/../build/bin/ryzom_logger_service -C. -L. --nobreak --writepid +screen -t lgs /bin/sh ../tools/scripts/linux/service_launcher.sh lgs $RYZOM_PATH/../build/bin/ryzom_logger_service -C. -L. --nobreak --writepid # mos -#screen -t mos /bin/sh service_launcher.sh mos $RYZOM_PATH/../build/bin/ryzom_monitor_service -C. -L. --nobreak --writepid +#screen -t mos /bin/sh ../tools/scripts/linux/service_launcher.sh mos $RYZOM_PATH/../build/bin/ryzom_monitor_service -C. -L. --nobreak --writepid # pdss -#screen -t pdss /bin/sh service_launcher.sh pdss $RYZOM_PATH/../build/bin/ryzom_pd_support_service -C. -L. --nobreak --writepid +#screen -t pdss /bin/sh ../tools/scripts/linux/service_launcher.sh pdss $RYZOM_PATH/../build/bin/ryzom_pd_support_service -C. -L. --nobreak --writepid # ras -screen -t ras /bin/sh service_launcher.sh ras $RYZOM_PATH/../build/bin/ryzom_admin_service --fulladminname=admin_service --shortadminname=AS -C. -L. --nobreak --writepid +screen -t ras /bin/sh ../tools/scripts/linux/service_launcher.sh ras $RYZOM_PATH/../build/bin/ryzom_admin_service --fulladminname=admin_service --shortadminname=AS -C. -L. --nobreak --writepid + +# switch back to AES screen +select 0 + diff --git a/code/ryzom/tools/scripts/linux/ryzom_domain_screen_wrapper.sh b/code/ryzom/tools/scripts/linux/ryzom_domain_screen_wrapper.sh index 895c387e7..4f2f14e25 100755 --- a/code/ryzom/tools/scripts/linux/ryzom_domain_screen_wrapper.sh +++ b/code/ryzom/tools/scripts/linux/ryzom_domain_screen_wrapper.sh @@ -4,7 +4,7 @@ CMD=$1 #DOMAIN=$(pwd|sed s%/home/nevrax/%%) DOMAIN=shard -if [ "$CMD" == "" ] +if [ "$CMD" = "" ] then echo echo Screen sessions currently running: @@ -21,68 +21,74 @@ then read CMD fi -if [ "$CMD" == "stop" ] +if [ "$CMD" = "stop" ] then if [ $(screen -list | grep \\\.${DOMAIN} | wc -l) != 1 ] then - echo Cannot stop domain \'${DOMAIN}\' because no screen by that name appears to be running - screen -list + echo Cannot stop domain \'${DOMAIN}\' because no screen by that name appears to be running + screen -list else - screen -d -r $(screen -list | grep \\\.${DOMAIN}| sed 's/(.*)//') -X quit> /dev/null - rm -v */*.state - rm -v */*launch_ctrl ./global.launch_ctrl + screen -d -r $(screen -list | grep \\\.${DOMAIN}| sed 's/(.*)//') -X quit> /dev/null + rm -v */*.state + rm -v */*launch_ctrl ./global.launch_ctrl fi fi STARTARGS= -if [ "$CMD" == "batchstart" ] +if [ "$CMD" = "batchstart" ] then STARTARGS='-d -m' CMD='start' fi -if [ "$CMD" == "start" ] +if [ "$CMD" = "start" ] then - ulimit -c unlimited - screen -wipe > /dev/null - if [ $( screen -list | grep \\\.${DOMAIN} | wc -w ) != 0 ] - then - echo Cannot start domain \'${DOMAIN}\' because this domain is already started - screen -list | grep $DOMAIN - else - screen $STARTARGS -S ${DOMAIN} -c ${DOMAIN}.screen.rc - fi + ulimit -c unlimited + screen -wipe > /dev/null + if [ $( screen -list | grep \\\.${DOMAIN} | wc -w ) != 0 ] + then + echo Cannot start domain \'${DOMAIN}\' because this domain is already started + screen -list | grep $DOMAIN + else + screen $STARTARGS -S ${DOMAIN} -c ${DOMAIN}.screen.rc + fi + + if [ "$STARTARGS" != "" ] + then + # on "batchstart", AES needs to be launched and AES will then launch other services + printf LAUNCH > aes/aes.launch_ctrl + fi fi -if [ "$CMD" == "join" ] +if [ "$CMD" = "join" ] then if [ $(screen -list | grep \\\.${DOMAIN} | wc -l) != 1 ] then - echo Cannot join domain \'${DOMAIN}\' because no screen by that name appears to be running - screen -list + echo Cannot join domain \'${DOMAIN}\' because no screen by that name appears to be running + screen -list else - screen -r $(screen -list | grep \\\.${DOMAIN}| sed 's/(.*)//') - fi + screen -r $(screen -list | grep \\\.${DOMAIN}| sed 's/(.*)//') + fi fi -if [ "$CMD" == "share" ] +if [ "$CMD" = "share" ] then if [ $(screen -list | grep \\\.${DOMAIN} | wc -l) != 1 ] then - echo Cannot join domain \'${DOMAIN}\' because no screen by that name appears to be running - screen -list + echo Cannot join domain \'${DOMAIN}\' because no screen by that name appears to be running + screen -list else - screen -r -x $(screen -list | grep \\\.${DOMAIN}| sed 's/(.*)//') - fi + screen -r -x $(screen -list | grep \\\.${DOMAIN}| sed 's/(.*)//') + fi fi -if [ "$CMD" == "state" ] +if [ "$CMD" = "state" ] then echo State of domain ${DOMAIN}: - if [ $(echo */*.state) == "*/*.state" ] + if [ "$(echo */*.state)" = "*/*.state" ] then - echo - No state files found - else - grep RUNNING *state - fi + echo - No state files found + else + grep RUNNING */*state + fi fi diff --git a/code/ryzom/tools/scripts/linux/service_launcher.sh b/code/ryzom/tools/scripts/linux/service_launcher.sh index 06b7aa64e..587f3875a 100755 --- a/code/ryzom/tools/scripts/linux/service_launcher.sh +++ b/code/ryzom/tools/scripts/linux/service_launcher.sh @@ -53,7 +53,7 @@ do CTRL_COMMAND=_$(cat $CTRL_FILE)_ # do we have a 'launch' command? - if [ $CTRL_COMMAND == _LAUNCH_ ] + if [ $CTRL_COMMAND = _LAUNCH_ ] then # update the start counter @@ -90,12 +90,11 @@ do # we have some kind of relaunch directive lined up so deal with it mv $NEXT_CTRL_FILE $CTRL_FILE else - # give the terminal user a chance to press enter to provoke a re-launch - HOLD=HOLD - read -t2 HOLD - if [ _${HOLD}_ != _HOLD_ ] - then - printf LAUNCH > $CTRL_FILE + # give the terminal user a chance to press enter to provoke a re-launch when auto-relaunch in AES is disabled + HOLD=`sh -ic '{ read a; echo "ENTER" 1>&3; kill 0; } | { sleep 2; kill 0; }' 3>&1 2>/dev/null` + if [ "${HOLD}" = "ENTER" ] + then + printf LAUNCH > $CTRL_FILE fi fi diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php index 867aa270b..f83f46576 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php @@ -289,8 +289,11 @@ class Users{ public static function createUser($values, $user_id){ try { //make connection with and put into shard db + $values['user_id']= $user_id; $dbs = new DBLayer("shard"); $dbs->execute("INSERT INTO user (Login, Password, Email) VALUES (:name, :pass, :mail)",$values); + $dbr = new DBLayer("ring"); + $dbr->execute("INSERT INTO ring_users (user_id, user_name, user_type) VALUES (:user_id, :name, 'ut_pioneer')",$values); ticket_user::createTicketUser( $user_id, 1); return "ok"; } diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user.php b/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user.php index aad237ae7..fa08ef1a5 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user.php @@ -37,6 +37,15 @@ function add_user(){ $pageElements['ingame_webpath'] = $INGAME_WEBPATH; helpers :: loadtemplate( 'register_feedback', $pageElements); exit; + }elseif ($_POST['page']=="settings"){ + // pass error and reload template accordingly + $result['prevUsername'] = $_POST["Username"]; + $result['prevPassword'] = $_POST["Password"]; + $result['prevConfirmPass'] = $_POST["ConfirmPass"]; + $result['prevEmail'] = $_POST["Email"]; + $result['no_visible_elements'] = 'TRUE'; + helpers :: loadtemplate( 'settings', $result); + exit; }else{ // pass error and reload template accordingly $result['prevUsername'] = $_POST["Username"]; @@ -44,7 +53,7 @@ function add_user(){ $result['prevConfirmPass'] = $_POST["ConfirmPass"]; $result['prevEmail'] = $_POST["Email"]; $result['no_visible_elements'] = 'TRUE'; - $pageElements['ingame_webpath'] = $INGAME_WEBPATH; + $pageElements['ingame_webpath'] = $INGAME_WEBPATH; helpers :: loadtemplate( 'register', $result); exit; } diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php index 2809ab05d..7c7cb933a 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php @@ -4,6 +4,32 @@ * This script will install all databases related to the Ryzom AMS and it will generate an admin account.. * @author Daan Janssens, mentored by Matthew Lagoe */ + + //set permissions + if(chmod('../../../www/login/logs', 0660)) { + echo "failed to set permissions on logs"; + exit; + } + if(chmod('../../../admin/graphs_output', 0660)) { + echo "failed to set permissions on graphs_output"; + exit; + } + if(chmod('../../../templates/default_c', 0660)) { + echo "failed to set permissions on default_c"; + exit; + } + if(chmod('../../www', 0660)) { + echo "failed to set permissions on www"; + exit; + } + if(chmod('../../www/html/cache', 0660)) { + echo "failed to set permissions on cache"; + exit; + } + if(chmod('../../www/html/templates_c', 0660)) { + echo "failed to set permissions on templates_c"; + exit; + } if (!isset($_POST['function'])) { //require the pages that are being needed. diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl index 4ea75af12..395071a5b 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl +++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl @@ -52,6 +52,164 @@ + {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "OK"} +
+ The password has been changed! +
+ {/if} + + {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "SHARDOFF"} +
+ The password has been changed, though the shard seems offline, it may take some time to see the change on the shard. +
+ {/if} + + + +
+ +
+ +
+
+ + + + + + +
+
+

Add User

+
+ + +
+
+
+
+
+ Add User + +
+ +
+
+ + +
+
+
+ +
+ +
+
+ + +
+
+
+ +
+ +
+
+ + +
+
+
+ +
+ +
+
+ + +
+
+
+ + + {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "OK"} +
+ The user is created! +
+ {/if} + + {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "SHARDOFF"} +
+ The user can't be created. +
+ {/if} + + + +
+ +
+ +
+
+
+
+
+
+ + +
+
+

Create User

+
+ + +
+
+
+
+
+ Create User + + {if !isset($changesOther) or $changesOther eq "FALSE"} +
+ +
+
+ + + {if isset($MATCH_ERROR) and $MATCH_ERROR eq "TRUE"}The password is incorrect{/if} +
+
+
+ {/if} +
+ +
+
+ + + {if isset($NEWPASSWORD_ERROR) and $NEWPASSWORD_ERROR eq "TRUE"}{$newpass_error_message}{/if} +
+
+
+ +
+ +
+
+ + + {if isset($CNEWPASSWORD_ERROR) and $CNEWPASSWORD_ERROR eq "TRUE"}{$confirmnewpass_error_message}{/if} +
+
+
+ + + {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "OK"}
The password has been changed!