Include other stuff from Forge server repo, same rev
parent
a3a074f455
commit
cca82baa89
@ -0,0 +1,52 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
# ______ _____ _ _ _____ _
|
||||||
|
# | ___ \ / ___| | | | |_ _| | |
|
||||||
|
# | |_/ / _ _______ _ __ ___ \ `--.| |__ __ _ _ __ __| | | | ___ ___ | |___
|
||||||
|
# | / | | |_ / _ \| '_ ` _ \ `--. \ '_ \ / _` | '__/ _` | | |/ _ \ / _ \| / __|
|
||||||
|
# | |\ \ |_| |/ / (_) | | | | | | /\__/ / | | | (_| | | | (_| | | | (_) | (_) | \__ \
|
||||||
|
# \_| \_\__, /___\___/|_| |_| |_| \____/|_| |_|\__,_|_| \__,_| \_/\___/ \___/|_|___/
|
||||||
|
# __/ |
|
||||||
|
# |___/
|
||||||
|
#
|
||||||
|
# Ryzom - MMORPG Framework <https://ryzom.com/dev/>
|
||||||
|
# Copyright (C) 2019 Winch Gate Property Limited
|
||||||
|
# This program is free software: read https://ryzom.com/dev/copying.html for more details
|
||||||
|
#
|
||||||
|
# This script is a helper to generate the configurations files of a ryzom shard
|
||||||
|
# just reading fields in a globals.cfg file and replacing it in all final cfgs files
|
||||||
|
#
|
||||||
|
# Usage are ./create_cfgs.py SHARD_PATH
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import os, sys
|
||||||
|
|
||||||
|
dstpath = sys.argv[1]
|
||||||
|
|
||||||
|
dir_path = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
||||||
|
templatepath = dir_path+"/templates/"
|
||||||
|
finalpath = dstpath+"/cfgs/"
|
||||||
|
|
||||||
|
enc = "iso-8859-1"
|
||||||
|
|
||||||
|
with open(dstpath+"/globals.cfg", 'r', encoding=enc) as fd:
|
||||||
|
if fd:
|
||||||
|
lines = fd.read().split("\n")
|
||||||
|
tmp = []
|
||||||
|
for n in lines:
|
||||||
|
if n:
|
||||||
|
line = n.split(" = ")
|
||||||
|
if line:
|
||||||
|
tmp.append(line)
|
||||||
|
|
||||||
|
for f in os.listdir(templatepath):
|
||||||
|
with open(templatepath+f, 'r', encoding=enc) as content:
|
||||||
|
if content:
|
||||||
|
content = content.read()
|
||||||
|
for k, v in tmp:
|
||||||
|
content = content.replace(k, v)
|
||||||
|
with open(finalpath+f, 'w') as fd:
|
||||||
|
fd.write(content)
|
||||||
|
print(f)
|
@ -0,0 +1,168 @@
|
|||||||
|
// Use with commandline: ryzom_admin_service -A. -C. -L. --nobreak --fulladminname=admin_executor_service --shortadminname=AES
|
||||||
|
|
||||||
|
#include "admin_executor_service_default.cfg"
|
||||||
|
|
||||||
|
// ---- config local variables
|
||||||
|
|
||||||
|
// Address of the admin service (default port is 49996)
|
||||||
|
ASHost = "localhost";
|
||||||
|
ASPort="46701";
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
AESAliasName= "aes";
|
||||||
|
|
||||||
|
StartCommands=
|
||||||
|
{
|
||||||
|
// Create a gateway module
|
||||||
|
"moduleManager.createModule StandardGateway gw",
|
||||||
|
// add a layer 5 transport
|
||||||
|
"gw.transportAdd L5Transport l5",
|
||||||
|
// open the transport
|
||||||
|
"gw.transportCmd l5(open)",
|
||||||
|
|
||||||
|
/// Create default connection with admin executor service
|
||||||
|
// Create a gateway module
|
||||||
|
"moduleManager.createModule StandardGateway gw_aes",
|
||||||
|
// create the admin executor service module
|
||||||
|
"moduleManager.createModule AdminExecutorServiceClient aes_client",
|
||||||
|
"aes_client.plug gw_aes",
|
||||||
|
|
||||||
|
// create a layer 3 client to connect to aes gateway
|
||||||
|
"gw_aes.transportAdd L3Client aes_l3c",
|
||||||
|
"gw_aes.transportCmd aes_l3c(connect addr="+AESHost+":"+AESPort+")",
|
||||||
|
|
||||||
|
// create the admin executor service module
|
||||||
|
"moduleManager.createModule AdminExecutorService aes",
|
||||||
|
|
||||||
|
// create a gateway to connect to as
|
||||||
|
"moduleManager.createModule StandardGateway asc_gw",
|
||||||
|
// create a layer 3 client
|
||||||
|
"asc_gw.transportAdd L3Client l3c",
|
||||||
|
"asc_gw.transportCmd l3c(connect addr="+ASHost+":"+ASPort+")",
|
||||||
|
|
||||||
|
// create a gateway for services to connect
|
||||||
|
"moduleManager.createModule StandardGateway aes_gw",
|
||||||
|
// create a layer 3 server
|
||||||
|
"aes_gw.transportAdd L3Server l3s",
|
||||||
|
"aes_gw.transportOptions l3s(PeerInvisible)",
|
||||||
|
"aes_gw.transportCmd l3s(open port="+AESPort+")",
|
||||||
|
|
||||||
|
// plug the as
|
||||||
|
"aes.plug asc_gw",
|
||||||
|
"aes.plug aes_gw",
|
||||||
|
};
|
||||||
|
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
"aes.addRegisteredService bms_master #SHARDNAME#",
|
||||||
|
// "aes.addRegisteredService bms_pd_master #SHARDNAME#",
|
||||||
|
"aes.addRegisteredService egs #SHARDNAME#",
|
||||||
|
"aes.addRegisteredService gpms #SHARDNAME#",
|
||||||
|
"aes.addRegisteredService ios #SHARDNAME#",
|
||||||
|
"aes.addRegisteredService rns #SHARDNAME#",
|
||||||
|
"aes.addRegisteredService rws #SHARDNAME#",
|
||||||
|
"aes.addRegisteredService ts #SHARDNAME#",
|
||||||
|
"aes.addRegisteredService ms #SHARDNAME#",
|
||||||
|
"aes.addRegisteredService ais_newbieland #SHARDNAME#",
|
||||||
|
"aes.addRegisteredService ais_fyros #SHARDNAME#",
|
||||||
|
"aes.addRegisteredService ais_roots #SHARDNAME#",
|
||||||
|
"aes.addRegisteredService ais_matis #SHARDNAME#",
|
||||||
|
"aes.addRegisteredService ais_tryker #SHARDNAME#",
|
||||||
|
"aes.addRegisteredService ais_zorai #SHARDNAME#",
|
||||||
|
"aes.addRegisteredService ais_ark #SHARDNAME#",
|
||||||
|
"aes.addRegisteredService mfs #SHARDNAME#",
|
||||||
|
"aes.addRegisteredService su #SHARDNAME#",
|
||||||
|
"aes.addRegisteredService fes #SHARDNAME#",
|
||||||
|
"aes.addRegisteredService sbs #SHARDNAME#",
|
||||||
|
"aes.addRegisteredService lgs #SHARDNAME#",
|
||||||
|
// "aes.addRegisteredService mos #SHARDNAME#",
|
||||||
|
// "aes.addRegisteredService pdss #SHARDNAME#",
|
||||||
|
"aes.addRegisteredService ras #SHARDNAME#",
|
||||||
|
"aes.addRegisteredService aes #SHARDNAME#",
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
bms_master = { "./", "/home/nevrax/dev/live/service_backup_service/backup_service", "-C. -L. --nobreak --writepid -P49990" };
|
||||||
|
bms_pd_master = { "./", "/home/nevrax/dev/live/service_backup_service/backup_service", "-C. -L. --nobreak --writepid -P49992" };
|
||||||
|
egs = { "./", "/home/nevrax/dev/live/service_entities_game_service/entities_game_service", "-C. -L. --nobreak --writepid" };
|
||||||
|
gpms = { "/home/nevrax/dev/gpms", "/home/nevrax/dev/live/service_gpm_service/gpm_service", "-C. -L. --nobreak --writepid" };
|
||||||
|
ios = { "/home/nevrax/dev/ios", "/home/nevrax/dev/live/service_input_output_service/input_output_service", "-C. -L. --nobreak --writepid" };
|
||||||
|
rns = { "/home/nevrax/dev/rns", "/home/nevrax/dev/live/service_ryzom_naming_service/ryzom_naming_service", "-C. -L. --nobreak --writepid" };
|
||||||
|
rws = { "/home/nevrax/dev/rws", "/home/nevrax/dev/live/service_ryzom_welcome_service/ryzom_welcome_service", "-C. -L. --nobreak --writepid" };
|
||||||
|
ts = { "/home/nevrax/dev/ts", "/home/nevrax/dev/live/service_tick_service/tick_service", "-C. -L. --nobreak --writepid" };
|
||||||
|
ms = { "/home/nevrax/dev/ms", "/home/nevrax/dev/live/service_mirror_service/mirror_service", "-C. -L. --nobreak --writepid" };
|
||||||
|
ais_newbieland = { "/home/nevrax/dev/ais_newbyland", "/home/nevrax/dev/live/service_ai_service/ai_service", "-C. -L. --nobreak --writepid -mCommon:Newbieland:Post" };
|
||||||
|
ais_fyros = { "/home/nevrax/dev/ais_newbyland", "/home/nevrax/dev/live/service_ai_service/ai_service", "-C. -L. --nobreak --writepid -mCommon:Newbieland:Post" };
|
||||||
|
ais_roots = { "/home/nevrax/dev/ais_newbyland", "/home/nevrax/dev/live/service_ai_service/ai_service", "-C. -L. --nobreak --writepid -mCommon:Newbieland:Post" };
|
||||||
|
ais_matis = { "/home/nevrax/dev/ais_newbyland", "/home/nevrax/dev/live/service_ai_service/ai_service", "-C. -L. --nobreak --writepid -mCommon:Newbieland:Post" };
|
||||||
|
ais_tryker = { "/home/nevrax/dev/ais_newbyland", "/home/nevrax/dev/live/service_ai_service/ai_service", "-C. -L. --nobreak --writepid -mCommon:Newbieland:Post" };
|
||||||
|
ais_zorai = { "/home/nevrax/dev/ais_newbyland", "/home/nevrax/dev/live/service_ai_service/ai_service", "-C. -L. --nobreak --writepid -mCommon:Newbieland:Post" };
|
||||||
|
ais_ark = { "/home/nevrax/dev/ais_newbyland", "/home/nevrax/dev/live/service_ai_service/ai_service", "-C. -L. --nobreak --writepid -mCommon:Newbieland:Post" };
|
||||||
|
mfs = { "/home/nevrax/dev/mfs", "/home/nevrax/dev/live/service_mail_forum_service/mail_forum_service", "-C. -L. --nobreak --writepid" };
|
||||||
|
su = { "/home/nevrax/dev/su", "/home/nevrax/dev/live/service_shard_unifier_service/shard_unifier_service", "-C. -L. --nobreak --writepid" };
|
||||||
|
fes = { "/home/nevrax/dev/fes", "/home/nevrax/dev/live/service_frontend_service/frontend_service", "-C. -L. --nobreak --writepid" };
|
||||||
|
sbs = { "/home/nevrax/dev/sbs", "/home/nevrax/dev/live/service_session_browser_server/session_browser_server", "-C. -L. --nobreak --writepid" };
|
||||||
|
lgs = { "/home/nevrax/dev/lgs", "/home/nevrax/dev/live/service_logger_service/logger_service", "-C. -L. --nobreak --writepid" };
|
||||||
|
mos = { "/home/nevrax/dev/mos", "/home/nevrax/dev/live/service_monitor_service/monitor_service", "-C. -L. --nobreak --writepid" };
|
||||||
|
pdss = { "/home/nevrax/dev/pdss", "/home/nevrax/dev/live/service_pd_support_service/pd_support_service", "-C. -L. --nobreak --writepid" };
|
||||||
|
ras = { "./", "src/ryzom_admin_service/ryzom_admin_service", "--fulladminname=admin_service --shortadminname=AS -C. -L. --nobreak --writepid" };
|
||||||
|
|
||||||
|
RegisteredServices=
|
||||||
|
{
|
||||||
|
"bms_master",
|
||||||
|
"bms_pd_master",
|
||||||
|
"egs",
|
||||||
|
"gpms",
|
||||||
|
"ios",
|
||||||
|
"rns",
|
||||||
|
"rws",
|
||||||
|
"ts",
|
||||||
|
"ms",
|
||||||
|
"ais_newbieland",
|
||||||
|
"ais_fyros",
|
||||||
|
"ais_roots",
|
||||||
|
"ais_matis",
|
||||||
|
"ais_tryker",
|
||||||
|
"ais_zorai",
|
||||||
|
"ais_ark",
|
||||||
|
"mfs",
|
||||||
|
"su",
|
||||||
|
"fes",
|
||||||
|
"sbs",
|
||||||
|
"lgs",
|
||||||
|
"mos",
|
||||||
|
"pdss",
|
||||||
|
"ras",
|
||||||
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
DontUseStdIn = 0;
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by CVariable class)
|
||||||
|
|
||||||
|
// If the update loop is too slow, a thread will produce an assertion.
|
||||||
|
// By default, the value is set to 10 minutes.
|
||||||
|
// Set to 0 for no assertion.
|
||||||
|
UpdateAssertionThreadTimeout = 0;
|
||||||
|
|
||||||
|
// ---- service custom variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
// ---- service custom variables (used by CVariable class)
|
||||||
|
|
||||||
|
// in second, -1 for not restarting
|
||||||
|
RestartDelay = 60;
|
||||||
|
|
||||||
|
// how many second before aborting the request if not finished
|
||||||
|
RequestTimeout = 5;
|
||||||
|
|
||||||
|
// log path for advanced log report
|
||||||
|
LogPath = "/.";
|
||||||
|
|
||||||
|
// setup for deployment environment with exeternal configuration system responsible for launching apps and
|
||||||
|
// for configuring AES services
|
||||||
|
DontLaunchServicesDirectly = 1;
|
||||||
|
UseExplicitAESRegistration = 1;
|
||||||
|
KillServicesOnDisconnect = 1;
|
||||||
|
|
||||||
|
ShardName="#SHARDNAME#";
|
@ -0,0 +1,7 @@
|
|||||||
|
#include "common.cfg"
|
||||||
|
|
||||||
|
// I'm the AES, I'll not connect to myself!
|
||||||
|
DontUseAES = 1;
|
||||||
|
|
||||||
|
// I don't need a connection to a naming service
|
||||||
|
DontUseNS = 1;
|
@ -0,0 +1,22 @@
|
|||||||
|
// Use with commandline: ryzom_admin_service --fulladminname=ryzom_admin_service --shortadminname=AS -C. -L. --nobreak --writepid
|
||||||
|
|
||||||
|
// ---- config local variables
|
||||||
|
|
||||||
|
ASWebPort="46700";
|
||||||
|
ASPort="46701";
|
||||||
|
|
||||||
|
#include "admin_service_default.cfg"
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
AESAliasName= "ras";
|
||||||
|
|
||||||
|
Paths += {
|
||||||
|
".",
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by CVariable class)
|
||||||
|
|
||||||
|
// ---- service custom variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
// ---- service custom variables (used by CVariable class)
|
@ -0,0 +1,27 @@
|
|||||||
|
#include "common.cfg"
|
||||||
|
|
||||||
|
DontUseNS = 1;
|
||||||
|
|
||||||
|
RRDToolPath = "rrdtool";
|
||||||
|
RRDVarPath = "../save/rrd_graphs";
|
||||||
|
|
||||||
|
// Variables required to be defined by other cfgs
|
||||||
|
//AESHost="localhost";
|
||||||
|
//ASWebPort="46700";
|
||||||
|
//ASPort="46701";
|
||||||
|
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
// create the admin service module and open the web interface
|
||||||
|
"moduleManager.createModule AdminService as webPort="+ASWebPort,
|
||||||
|
|
||||||
|
// create a gateway for aes to connect
|
||||||
|
"moduleManager.createModule StandardGateway as_gw",
|
||||||
|
// create a layer 3 server
|
||||||
|
"as_gw.transportAdd L3Server l3s",
|
||||||
|
"as_gw.transportOptions l3s(PeerInvisible)",
|
||||||
|
"as_gw.transportCmd l3s(open port="+ASPort+")",
|
||||||
|
|
||||||
|
// plug the as
|
||||||
|
"as.plug as_gw",
|
||||||
|
};
|
@ -0,0 +1,128 @@
|
|||||||
|
|
||||||
|
|
||||||
|
//14.11.02
|
||||||
|
|
||||||
|
//this is the latest version of the ags script
|
||||||
|
//contents : matis city NPCs, bush fauna (low level-newbie zone)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "common.cfg";
|
||||||
|
|
||||||
|
DisplayedVariables += {"GlobalActorCount","GlobalActorMoves","GlobalActorUpdates"};
|
||||||
|
|
||||||
|
// by default, use localhost to find the naming service
|
||||||
|
//NSHost = "ldserver:50000";
|
||||||
|
//NSHost = "gamedev4";
|
||||||
|
|
||||||
|
// load all continents
|
||||||
|
UsedContinents =
|
||||||
|
{
|
||||||
|
// "fyros",
|
||||||
|
// "tryker",
|
||||||
|
"matis",
|
||||||
|
// "zorai",
|
||||||
|
};
|
||||||
|
|
||||||
|
Paths += { "data_leveldesign" /*, "data_common", "data_shard"*/ };
|
||||||
|
|
||||||
|
|
||||||
|
// StartCommands = { "loadPrim demo.prim" }; // .prim is an obsolete file format (it used to work for collision with trees)
|
||||||
|
|
||||||
|
StartCommandsWhenMirrorReady = {
|
||||||
|
|
||||||
|
// THIS IS GOOD NEW STUFF
|
||||||
|
"checkGenerateAndRun ags_test_creatures1 1571 -5135 10 25 creature c????1.creature",
|
||||||
|
"checkGenerateAndRun ags_test_creatures_testroom 1571 -4825 5 50 creature testroom_*.creature",
|
||||||
|
/*
|
||||||
|
// THIS IS OLD STUFF
|
||||||
|
// to be removed later
|
||||||
|
"checkGenerateAndRun ags_test_lvl_01 1721 -4805 5 20 creature *_lvl_01.creature",
|
||||||
|
"checkGenerateAndRun ags_test_hom 1721 -4755 5 20 creature *_hom_*.creature",
|
||||||
|
"checkGenerateAndRun ags_test_hof 1721 -4745 5 20 creature *_hof_*.creature",
|
||||||
|
"checkGenerateAndRun ags_test_set 1721 -4735 5 20 creature *_set.creature",
|
||||||
|
"checkGenerateAndRun ags_test_karavan 1721 -4725 5 20 creature karavan_*.creature",
|
||||||
|
"checkGenerateAndRun ags_test_kami 1721 -4715 5 20 creature kami*_*.creature",
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
"generateScript ags_test_lvl_01.script 1721 -5000 5 20 creature *_lvl_01.creature",
|
||||||
|
"generateScript ags_test_hom.script 1721 -4950 5 20 creature *_hom_*.creature",
|
||||||
|
"generateScript ags_test_hof.script 1721 -4940 5 20 creature *_hof_*.creature",
|
||||||
|
"generateScript ags_test_set.script 1721 -4930 5 20 creature *_set.creature",
|
||||||
|
"generateScript ags_test_karavan.script 1721 -4920 5 20 creature karavan_*.creature",
|
||||||
|
"generateScript ags_test_kami.script 1721 -4910 5 20 creature kami*_*.creature",
|
||||||
|
|
||||||
|
"runScript lvl_01 ags_test_lvl_01.script on",
|
||||||
|
"runScript hom ags_test_hom.script on",
|
||||||
|
"runScript hof ags_test_hof.script on",
|
||||||
|
"runScript set ags_test_set.script on",
|
||||||
|
"runScript karanvan ags_test_karavan.script on",
|
||||||
|
"runScript kami ags_test_kami.script on",
|
||||||
|
*/
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
for scripting :
|
||||||
|
|
||||||
|
one command per line, no surrounding "
|
||||||
|
|
||||||
|
commands are :
|
||||||
|
|
||||||
|
- cmd: Execute a service command
|
||||||
|
ex: cmd help
|
||||||
|
cmd actorCreatePosition demo-point-004
|
||||||
|
|
||||||
|
- setText: Set a variable as plain text. Value can be computed using other
|
||||||
|
variables to compose strings (with the $(varname) syntax)
|
||||||
|
ex: setText myVar myValue
|
||||||
|
setText myVar $(myOtherVar) blah blah
|
||||||
|
synonym: set$ works like setText
|
||||||
|
|
||||||
|
- setNumeric: set a variable as numeric value. Value can be computed using
|
||||||
|
other variables (no specific syntax, variable names are written in plain text)
|
||||||
|
a variable existence can be tested by preceding its name by a ?. If the variable
|
||||||
|
exists, the ?var is set to 1, otherwise 0.
|
||||||
|
ex: setNumeric myVar 0.1234
|
||||||
|
setNumeric myVar myOtherVar*2.0+55690.1*sin(myVar)
|
||||||
|
setNumeric isReady ?myVar
|
||||||
|
synonym: set# works like setNumeric
|
||||||
|
|
||||||
|
- erase: erases a variable. Variable is completely deleted. ?var returns 0 after until var is redefined
|
||||||
|
ex: erase myVar
|
||||||
|
|
||||||
|
- wait: halt script for n cycles
|
||||||
|
ex: wait 10
|
||||||
|
|
||||||
|
- receive: halt script until expression is true (true is a value different from 0)
|
||||||
|
common operators can be used (<, >, == etc.)
|
||||||
|
ex: receive myVar>1.0
|
||||||
|
receive ?myVar
|
||||||
|
|
||||||
|
- send: send a value to all running scripts. Couple variable/value will be defined then in all running scripts
|
||||||
|
useful to synchronize scripts, or trigger events... value is text replaced using $(...) syntax
|
||||||
|
ex: send myVar blah blah
|
||||||
|
send myVar $(myOtherVar)
|
||||||
|
|
||||||
|
- display: displays a string, text replaced using $(...) syntax
|
||||||
|
ex: display myVar=$(myVar)
|
||||||
|
display number of players=$(nbPlayers)
|
||||||
|
|
||||||
|
- if: tests a condition, and runs alternative. alternative bloc can have an else part, and must be ended by endif
|
||||||
|
ex: if myVar > 10
|
||||||
|
display myVar is greater than 10
|
||||||
|
else
|
||||||
|
display myVar is less than 10
|
||||||
|
endif
|
||||||
|
|
||||||
|
- while: execute a bloc while a condition is verified. bloc must be ended by endloop
|
||||||
|
ex: while myVar > 10
|
||||||
|
set# myVar myVar-1
|
||||||
|
endloop
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
Paths +=
|
||||||
|
{
|
||||||
|
"data_shard/pacs",
|
||||||
|
"data/3d/continents",
|
||||||
|
"data_shard",
|
||||||
|
"data_common"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Commands =
|
||||||
|
{
|
||||||
|
"setStartPoint matis 4700 -3500",
|
||||||
|
|
||||||
|
"pacsCrunch matis"
|
||||||
|
};
|
@ -0,0 +1,28 @@
|
|||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "common.cfg";
|
||||||
|
|
||||||
|
DontUseAES = 1;
|
||||||
|
DontUseNS = 1;
|
||||||
|
|
||||||
|
// Paths += { "data_leveldesign", "data_common" };
|
||||||
|
Paths += { "./data_shard/pacs", "./data/3d/continents" };
|
||||||
|
Paths += { "data_leveldesign/leveldesign/World" };
|
||||||
|
|
||||||
|
SrcPaths = { "./data_leveldesign/leveldesign/new_world" };
|
||||||
|
ObjPath = "./data_leveldesign/leveldesign/new_world";
|
||||||
|
SavPath = "./data_leveldesign/leveldesign/new_world";
|
||||||
|
|
||||||
|
DisplayedVariables += { "EvaluatedPos" };
|
||||||
|
|
||||||
|
|
||||||
|
StartCommands =
|
||||||
|
{
|
||||||
|
// "pacs_crunch fyros",
|
||||||
|
// "pacs_crunch matis",
|
||||||
|
// "pacs_crunch tryker",
|
||||||
|
// "pacs_crunch bagne",
|
||||||
|
// "pacs_crunch sources",
|
||||||
|
|
||||||
|
// "aiMake"
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,146 @@
|
|||||||
|
// Use with commandline: ai_service -C. -L. --nobreak --writepid -mCommon:Newbieland:Post
|
||||||
|
|
||||||
|
// ---- config local variables
|
||||||
|
|
||||||
|
SUPort = 50505;
|
||||||
|
SUHost = "localhost";
|
||||||
|
// SU - listen address of the SU service (for L5 connections)
|
||||||
|
SUAddress = SUHost+":"+SUPort;
|
||||||
|
|
||||||
|
#include "ai_service_default.cfg"
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
//AESAliasName= "ais_newbieland";
|
||||||
|
|
||||||
|
GraphVars += { "TickSpeedLoop", "0" };
|
||||||
|
GraphVars += { "TickSpeedLoop", "60000" };
|
||||||
|
GraphVars += { "L5CallbackCount", "0" };
|
||||||
|
GraphVars += { "L5CallbackCount", "60000" };
|
||||||
|
GraphVars += { "L5CallbackTime", "0" };
|
||||||
|
GraphVars += { "L5CallbackTime", "60000" };
|
||||||
|
GraphVars += { "MirrorCallbackCount", "0" };
|
||||||
|
GraphVars += { "MirrorCallbackCount", "60000" };
|
||||||
|
GraphVars += { "MirrorCallbackTime", "0" };
|
||||||
|
GraphVars += { "MirrorCallbackTime", "60000" };
|
||||||
|
|
||||||
|
Paths += {
|
||||||
|
"../data",
|
||||||
|
"../common/",
|
||||||
|
"../common/data_leveldesign",
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by CVariable class)
|
||||||
|
|
||||||
|
// ---- service custom variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
#include "used_continents.cfg"
|
||||||
|
|
||||||
|
// Mirror limits
|
||||||
|
DatasetSizefe_temp = 700000;
|
||||||
|
DatasetSizefame = 26000;
|
||||||
|
|
||||||
|
// define the primitives configuration used. (AIS, EGS)
|
||||||
|
UsedPrimitives =
|
||||||
|
{
|
||||||
|
"newbieland_all",
|
||||||
|
// "newbieland",
|
||||||
|
"matis_newbie_all",
|
||||||
|
// "matis_newbieland",
|
||||||
|
|
||||||
|
"matis_all",
|
||||||
|
// "matis_majesticgarden",
|
||||||
|
// "matis_fleetinggarden",
|
||||||
|
// "matis_groveofconfusion",
|
||||||
|
// "matis_hereticshovel",
|
||||||
|
// "matis_hiddensource",
|
||||||
|
// "matis_knollofdissent",
|
||||||
|
// "matis_upperbog",
|
||||||
|
|
||||||
|
"matis_island_all",
|
||||||
|
|
||||||
|
"zorai_newbie_all",
|
||||||
|
// "zorai_newbieland",
|
||||||
|
|
||||||
|
"zorai_all",
|
||||||
|
// "zorai_citiesofintuition",
|
||||||
|
// "zorai_maidengrove",
|
||||||
|
// "zorai_groveofumbra",
|
||||||
|
// "zorai_havenofpurity",
|
||||||
|
// "zorai_knotofdementia",
|
||||||
|
// "zorai_thevoid",
|
||||||
|
|
||||||
|
"zorai_island_all",
|
||||||
|
|
||||||
|
"fyros_newbie_all",
|
||||||
|
// "fyros_newbieland",
|
||||||
|
|
||||||
|
"fyros_all",
|
||||||
|
// "fyros_imperialdune",
|
||||||
|
// "fyros_oflovaksoasis",
|
||||||
|
// "fyros_frahartowers",
|
||||||
|
// "fyros_dunesofexil",
|
||||||
|
// "fyros_outlawcanyon",
|
||||||
|
// "fyros_sawdustmines",
|
||||||
|
// "fyros_thesavagedunes",
|
||||||
|
// "fyros_thescorchedcorridor",
|
||||||
|
|
||||||
|
"fyros_island_all",
|
||||||
|
|
||||||
|
"tryker_newbie_all",
|
||||||
|
// "tryker_newbieland",
|
||||||
|
|
||||||
|
"tryker_all",
|
||||||
|
// "tryker_bountybeaches",
|
||||||
|
// "tryker_enchantedisle",
|
||||||
|
// "tryker_lagoonsofloria",
|
||||||
|
// "tryker_libertylake",
|
||||||
|
// "tryker_thefount",
|
||||||
|
// "tryker_windsofmuse",
|
||||||
|
|
||||||
|
"tryker_island_all",
|
||||||
|
|
||||||
|
|
||||||
|
"terre_all",
|
||||||
|
// "terre_forbidden_depths",
|
||||||
|
// "terre_the_land_of_continuty",
|
||||||
|
// "terre_the_sunken_city",
|
||||||
|
"sources_all",
|
||||||
|
// "sources_the_under_spring",
|
||||||
|
"route_gouffre_all",
|
||||||
|
// "route_gouffre_gate_of_obscurity",
|
||||||
|
// "route_gouffre_the_elusive_forest",
|
||||||
|
// "route_gouffre_the_trench_of_trials",
|
||||||
|
// "route_gouffre_the_windy_gate",
|
||||||
|
"nexus_all",
|
||||||
|
// "nexus_nexus",
|
||||||
|
"bagne_all",
|
||||||
|
// "bagne_the_abyss_of_ichor",
|
||||||
|
|
||||||
|
"kitiniere_all",
|
||||||
|
// "kitiniere",
|
||||||
|
//ace kitiniere+tcm "corrupted_moor_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
// the following variable must be defined but should be empty - it's presence is used to change the behaviour
|
||||||
|
// of the packed sheet reader
|
||||||
|
GeorgePaths = { "" };
|
||||||
|
|
||||||
|
|
||||||
|
// ---- service custom variables (used by CVariable class)
|
||||||
|
|
||||||
|
NbPlayersLimit = PlayerLimit;
|
||||||
|
|
||||||
|
// Entity Limits (AIS)
|
||||||
|
NbPetLimit = NbPlayersLimit*4;
|
||||||
|
NbFaunaLimit = 50000;
|
||||||
|
NbNpcLimit = 20000;
|
||||||
|
NbFxLimit = 500;
|
||||||
|
|
||||||
|
#include "backup_service_interface.cfg"
|
||||||
|
|
||||||
|
// Set this shard as a ring (1) or mainland (0) shard (main behavior switch)
|
||||||
|
IsRingShard = 0;
|
||||||
|
|
||||||
|
// Disable ryzom verbose logging
|
||||||
|
VerboseMIRROR = 0;
|
@ -0,0 +1,388 @@
|
|||||||
|
#include "common.cfg"
|
||||||
|
|
||||||
|
// a list of system command that run at server startup.
|
||||||
|
SystemCmd = {};
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
//- Basic (specific) heal profile parameters ---------------------------------
|
||||||
|
// Downtime for normal heal (on other bots of the group)
|
||||||
|
HealSpecificDowntime = 100;
|
||||||
|
// Downtime for self heal
|
||||||
|
HealSpecificDowntimeSelf = 100;
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// Disable caching of ligo primitive in binary files
|
||||||
|
CachePrims = 0;
|
||||||
|
CachePrimsLog = 0;
|
||||||
|
|
||||||
|
// do not log the corrected position.
|
||||||
|
LogAcceptablePos = 0;
|
||||||
|
// do not log group creation failure
|
||||||
|
LogGroupCreationFailure = 0;
|
||||||
|
// do not log aliad tree owner construstion.
|
||||||
|
LogAliasTreeOwner = 0;
|
||||||
|
// do not log outpost info
|
||||||
|
LogOutpostDebug = 0;
|
||||||
|
// Speed factor, for debug purpose only. Don't set to high speed factor !
|
||||||
|
SpeedFactor = 1;
|
||||||
|
// Speep up the timer triggering. Set a value between 1 (normal) and INT_MAX.
|
||||||
|
TimerSpeedUp = 1;
|
||||||
|
|
||||||
|
// Default timer for wander behavior
|
||||||
|
DefaultWanderMinTimer = 50; // 5s
|
||||||
|
DefaultWanderMaxTimer = 100; // 10s
|
||||||
|
|
||||||
|
// Fame and guard behavior
|
||||||
|
// Fame value under witch the guard attack the player in sigth
|
||||||
|
FameForGuardAttack = -450000;
|
||||||
|
// The minimum of fame for guard to help the player
|
||||||
|
FameForGuardHelp = -200000;
|
||||||
|
|
||||||
|
// The default aggro distance for NPC
|
||||||
|
DefaultNpcAggroDist = 15;
|
||||||
|
// The default escort range for escort behavior
|
||||||
|
DefaultEscortRange = 10;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Aggro //
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
AggroReturnDistCheck = 15.0;
|
||||||
|
AggroReturnDistCheckFauna = 15.0;
|
||||||
|
AggroReturnDistCheckNpc = 1.5;
|
||||||
|
AggroD1Radius = 250.0;
|
||||||
|
AggroD2Radius = 150.0;
|
||||||
|
AggroPrimaryGroupDist = 0.0;
|
||||||
|
AggroPrimaryGroupCoef = 0.0;
|
||||||
|
AggroSecondaryGroupDist = 0.0;
|
||||||
|
AggroSecondaryGroupCoef = 0.0;
|
||||||
|
AggroPropagationRadius = 60.0;
|
||||||
|
|
||||||
|
BotRepopFx = "";
|
||||||
|
|
||||||
|
// GROUP KEYWORDS
|
||||||
|
// used mainly in event handlers to determine to which groups events apply
|
||||||
|
KeywordsGroupNpc = {
|
||||||
|
|
||||||
|
"patrol", // a group of bots who guard a patrol route or point
|
||||||
|
"convoy", // a group with pack animals who follow roads from place to place
|
||||||
|
"with_players", // a group who may travel with players
|
||||||
|
};
|
||||||
|
|
||||||
|
// BOT KEYWORDS
|
||||||
|
// used mainly in npc_state_profile to determine which ai profiles to assign to which bots
|
||||||
|
KeywordsBotNpc = {
|
||||||
|
|
||||||
|
"team_leader", // a bot who leads the way in front of their team (and acts as leader
|
||||||
|
// in discussion with players)
|
||||||
|
"animal_leader", // a bot who leads pack animals
|
||||||
|
"guard", // a bot who is a guard of some sort (eg karavan guard)
|
||||||
|
"emissary", // eg karavan emissary
|
||||||
|
"preacher", // eg kami preacher
|
||||||
|
"guardian", // typically kami guardians
|
||||||
|
"vip", // someone who has an escort of players or NPCs (assumed to be harmless)
|
||||||
|
};
|
||||||
|
|
||||||
|
// STATE KEYWORDS
|
||||||
|
// used mainly in event handlers to determine to which state events apply
|
||||||
|
// eg: when a player goes link dead if the team that this player is escorting
|
||||||
|
// is in a dangerous area the team may enter a 'protect ourselves and wait for
|
||||||
|
// players' punctual state
|
||||||
|
KeywordsStateNpc = {
|
||||||
|
|
||||||
|
"safe", // eg the gathering point at town entrance
|
||||||
|
"dangerous", // eg a route through the wilds
|
||||||
|
};
|
||||||
|
|
||||||
|
ColourNames =
|
||||||
|
{
|
||||||
|
"red : 0",
|
||||||
|
"beige : 1",
|
||||||
|
"green : 2",
|
||||||
|
"turquoise : 3",
|
||||||
|
"blue : 4",
|
||||||
|
"violet : 5",
|
||||||
|
"white : 6",
|
||||||
|
"black : 7",
|
||||||
|
|
||||||
|
"redHair: 0",
|
||||||
|
"blackHair: 1",
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
StartCommandsWhenMirrorReady = {
|
||||||
|
};
|
||||||
|
|
||||||
|
//---------------------------------------------------------
|
||||||
|
// commands for multi IA configuration
|
||||||
|
// For multi IA config, use the -m command line switch folowed
|
||||||
|
// by a semicolon separated list of command block to run.
|
||||||
|
// ex :
|
||||||
|
// -mCommon:Matis:Post
|
||||||
|
// will execute the folowing command blocks in order :
|
||||||
|
// * StartCommandsWhenMirrorReadyCommon
|
||||||
|
// * StartCommandsWhenMirrorReadyMatis
|
||||||
|
// * StartCommandsWhenMirrorReadyPost
|
||||||
|
//---------------------------------------------------------
|
||||||
|
// common commands before loading continents
|
||||||
|
StartCommandsWhenMirrorReadyCommon =
|
||||||
|
{
|
||||||
|
"RandomPosMaxRetry 6400",
|
||||||
|
"fightRangeRange 4 60",
|
||||||
|
"LogOutpostDebug 1",
|
||||||
|
"grpHistoryRecordLog",
|
||||||
|
|
||||||
|
"verboseAIProfiles",
|
||||||
|
"verboseAliasNodeTreeParserLog",
|
||||||
|
"verboseCombatLog",
|
||||||
|
"verboseFaunaMgrLog",
|
||||||
|
"verboseFaunaParseLog",
|
||||||
|
"verboseNPCBotProfiles",
|
||||||
|
"verboseNPCMgrLog",
|
||||||
|
"verboseNPCParserLog",
|
||||||
|
"verboseNpcDescriptionMsgLog",
|
||||||
|
"verbosePrimitiveParserLog",
|
||||||
|
// "verboseSwitchMultipleChangesOfAProperty",
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// commands for indoors continent
|
||||||
|
StartCommandsWhenMirrorReadyIndoors =
|
||||||
|
{
|
||||||
|
"loadContinent indoors",
|
||||||
|
"createStaticAIInstance indoors",
|
||||||
|
"loadMapsFromCommon indoors_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
// commands for Matis continent
|
||||||
|
StartCommandsWhenMirrorReadyMatis =
|
||||||
|
{
|
||||||
|
"loadContinent matis",
|
||||||
|
"createStaticAIInstance matis",
|
||||||
|
"loadMapsFromCommon matis_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
// commands for Matis newbie continent
|
||||||
|
StartCommandsWhenMirrorReadyMatisNewbie =
|
||||||
|
{
|
||||||
|
"loadContinent matis",
|
||||||
|
"createStaticAIInstance matis_newbie",
|
||||||
|
"loadMapsFromCommon matis_newbie_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
// commands for Zorai continent
|
||||||
|
StartCommandsWhenMirrorReadyZorai =
|
||||||
|
{
|
||||||
|
"loadContinent zorai",
|
||||||
|
"createStaticAIInstance zorai",
|
||||||
|
"loadMapsFromCommon zorai_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
// commands for Zorai newbie continent
|
||||||
|
StartCommandsWhenMirrorReadyZoraiNewbie =
|
||||||
|
{
|
||||||
|
"loadContinent zorai",
|
||||||
|
"createStaticAIInstance zorai_newbie",
|
||||||
|
"loadMapsFromCommon zorai_newbie_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
// commands for Fyros continent
|
||||||
|
StartCommandsWhenMirrorReadyFyros =
|
||||||
|
{
|
||||||
|
"loadContinent fyros",
|
||||||
|
"createStaticAIInstance fyros",
|
||||||
|
"loadMapsFromCommon fyros_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
// commands for Fyros newbie continent
|
||||||
|
StartCommandsWhenMirrorReadyFyrosNewbie =
|
||||||
|
{
|
||||||
|
"loadContinent fyros_newbie",
|
||||||
|
"createStaticAIInstance fyros_newbie",
|
||||||
|
"loadMapsFromCommon fyros_newbie_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
// commands for Tryker continent
|
||||||
|
StartCommandsWhenMirrorReadyTryker =
|
||||||
|
{
|
||||||
|
"loadContinent tryker",
|
||||||
|
"createStaticAIInstance tryker",
|
||||||
|
"loadMapsFromCommon tryker_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
// commands for Tryker newbie continent
|
||||||
|
StartCommandsWhenMirrorReadyTrykerNewbie =
|
||||||
|
{
|
||||||
|
"loadContinent tryker_newbie",
|
||||||
|
"createStaticAIInstance tryker_newbie",
|
||||||
|
"loadMapsFromCommon tryker_newbie_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
// commands for bagne continents
|
||||||
|
StartCommandsWhenMirrorReadyBagne =
|
||||||
|
{
|
||||||
|
"loadContinent bagne",
|
||||||
|
"createStaticAIInstance bagne",
|
||||||
|
"loadMapsFromCommon bagne_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
StartCommandsWhenMirrorReadyNexus =
|
||||||
|
{
|
||||||
|
"loadContinent nexus",
|
||||||
|
"createStaticAIInstance nexus",
|
||||||
|
"loadMapsFromCommon nexus_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
StartCommandsWhenMirrorReadyRouteGouffre =
|
||||||
|
{
|
||||||
|
"loadContinent route_gouffre",
|
||||||
|
"createStaticAIInstance route_gouffre",
|
||||||
|
"loadMapsFromCommon route_gouffre_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
StartCommandsWhenMirrorReadySources =
|
||||||
|
{
|
||||||
|
"loadContinent sources_interdites",
|
||||||
|
"createStaticAIInstance sources",
|
||||||
|
"loadMapsFromCommon sources_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
StartCommandsWhenMirrorReadyTerre =
|
||||||
|
{
|
||||||
|
"loadContinent terre_oubliee",
|
||||||
|
"createStaticAIInstance terre",
|
||||||
|
"loadMapsFromCommon terre_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
// commands for Fyros Island continent
|
||||||
|
StartCommandsWhenMirrorReadyFyrosIsland =
|
||||||
|
{
|
||||||
|
"loadContinent fyros_island",
|
||||||
|
"createStaticAIInstance fyros_island",
|
||||||
|
"loadMapsFromCommon fyros_island_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
// commands for Zorai Island continent
|
||||||
|
StartCommandsWhenMirrorReadyZoraiIsland =
|
||||||
|
{
|
||||||
|
"loadContinent zorai_island",
|
||||||
|
"createStaticAIInstance zorai_island",
|
||||||
|
"loadMapsFromCommon zorai_island_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
// commands for Tryker Island continent
|
||||||
|
StartCommandsWhenMirrorReadyTrykerIsland =
|
||||||
|
{
|
||||||
|
"loadContinent tryker_island",
|
||||||
|
"createStaticAIInstance tryker_island",
|
||||||
|
"loadMapsFromCommon tryker_island_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
// commands for Matis island continent
|
||||||
|
StartCommandsWhenMirrorReadyMatisIsland =
|
||||||
|
{
|
||||||
|
"loadContinent matis_island",
|
||||||
|
"createStaticAIInstance matis_island",
|
||||||
|
"loadMapsFromCommon matis_island_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
// commands for Newbieland continent
|
||||||
|
StartCommandsWhenMirrorReadyNewbieland =
|
||||||
|
{
|
||||||
|
"loadContinent newbieland",
|
||||||
|
"createStaticAIInstance newbieland",
|
||||||
|
"loadMapsFromCommon newbieland_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
// commands for Kitiniere continent
|
||||||
|
StartCommandsWhenMirrorReadyKitiniere =
|
||||||
|
{
|
||||||
|
"loadContinent kitiniere",
|
||||||
|
"createStaticAIInstance kitiniere",
|
||||||
|
"loadMapsFromCommon kitiniere_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
// commands for R2 continent
|
||||||
|
StartCommandsWhenMirrorReadyR2Desert =
|
||||||
|
{
|
||||||
|
"loadContinent r2_desert",
|
||||||
|
"createStaticAIInstance r2_desert",
|
||||||
|
"loadMapsFromCommon r2_desert_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
// commands for R2 continent
|
||||||
|
StartCommandsWhenMirrorReadyR2Forest =
|
||||||
|
{
|
||||||
|
"loadContinent r2_forest",
|
||||||
|
"createStaticAIInstance r2_forest",
|
||||||
|
"loadMapsFromCommon r2_forest_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
// commands for R2 continent
|
||||||
|
StartCommandsWhenMirrorReadyR2Lakes =
|
||||||
|
{
|
||||||
|
"loadContinent r2_lakes",
|
||||||
|
"createStaticAIInstance r2_lakes",
|
||||||
|
"loadMapsFromCommon r2_lakes_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
// commands for R2 continent
|
||||||
|
StartCommandsWhenMirrorReadyR2Jungle =
|
||||||
|
{
|
||||||
|
"loadContinent r2_jungle",
|
||||||
|
"createStaticAIInstance r2_jungle",
|
||||||
|
"loadMapsFromCommon r2_jungle_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
// commands for R2 continent
|
||||||
|
StartCommandsWhenMirrorReadyR2Roots =
|
||||||
|
{
|
||||||
|
"loadContinent r2_roots",
|
||||||
|
"createStaticAIInstance r2_roots",
|
||||||
|
"loadMapsFromCommon r2_roots_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// commands for post continents loading
|
||||||
|
StartCommandsWhenMirrorReadyPost =
|
||||||
|
{
|
||||||
|
"spawnInstances",
|
||||||
|
"updateAI",
|
||||||
|
"updateAI",
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// commands for Ring continents
|
||||||
|
StartCommandsWhenMirrorReadyRing =
|
||||||
|
{
|
||||||
|
"loadContinent r2_desert",
|
||||||
|
"createDynamicAIInstance 10000",
|
||||||
|
"loadPrimitiveFile dummy.primitive",
|
||||||
|
|
||||||
|
"loadContinent r2_forest",
|
||||||
|
"createDynamicAIInstance 10001",
|
||||||
|
"loadPrimitiveFile dummy.primitive",
|
||||||
|
|
||||||
|
"loadContinent r2_lakes",
|
||||||
|
"createDynamicAIInstance 10003",
|
||||||
|
"loadPrimitiveFile dummy.primitive",
|
||||||
|
|
||||||
|
"loadContinent r2_jungle",
|
||||||
|
"createDynamicAIInstance 10002",
|
||||||
|
"loadPrimitiveFile dummy.primitive",
|
||||||
|
|
||||||
|
"loadContinent r2_roots",
|
||||||
|
"createDynamicAIInstance 10004",
|
||||||
|
"loadPrimitiveFile dummy.primitive",
|
||||||
|
|
||||||
|
// "spawnInstances",
|
||||||
|
"updateAI",
|
||||||
|
"updateAI",
|
||||||
|
|
||||||
|
// L5 connect to the shard unifier
|
||||||
|
"unifiedNetwork.addService ShardUnifier ( address="+SUAddress+" sendId external autoRetry )",
|
||||||
|
|
||||||
|
// Create a shard AIS Module
|
||||||
|
"moduleManager.createModule AisControl ais",
|
||||||
|
// Connect AIS
|
||||||
|
"ais.plug gw"
|
||||||
|
};
|
@ -0,0 +1,34 @@
|
|||||||
|
// Use with commandline: backup_service -C. -L. --nobreak --writepid -P49990
|
||||||
|
|
||||||
|
#include "backup_service_default.cfg"
|
||||||
|
|
||||||
|
// ---- config local variables
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
AESAliasName = "bms_master";
|
||||||
|
|
||||||
|
Paths += {
|
||||||
|
".",
|
||||||
|
"../common/data_leveldesign",
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by CVariable class)
|
||||||
|
|
||||||
|
// Where to save specific shard data (ie: player backup), relatively to SaveShardRoot
|
||||||
|
SaveFilesDirectory = "";
|
||||||
|
|
||||||
|
// where to save generic shard data (ie: packed_sheet)
|
||||||
|
WriteFilesDirectory = "../data";
|
||||||
|
|
||||||
|
// ---- service custom variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
WebPort = 49970;
|
||||||
|
|
||||||
|
// ---- service custom variables (used by CVariable class)
|
||||||
|
|
||||||
|
// BS - Root directory where data are backuped to
|
||||||
|
IncrementalBackupDirectory = "../incremental_backup";
|
||||||
|
|
||||||
|
// Root directory where data from shards are stored into
|
||||||
|
SaveShardRoot = "../save/";
|
@ -0,0 +1,31 @@
|
|||||||
|
#include "common.cfg"
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
DontUseNS = 1;
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by CVariable class)
|
||||||
|
|
||||||
|
ListeningPort = 49990;
|
||||||
|
|
||||||
|
// ---- service custom variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
// Listening port for the Web server to connect in
|
||||||
|
|
||||||
|
WebPort = 49898;
|
||||||
|
|
||||||
|
BSReadState = 1;
|
||||||
|
|
||||||
|
// ---- service custom variables (used by CVariable class)
|
||||||
|
|
||||||
|
// Port for the Layer 3 interface of the backup service
|
||||||
|
L3ListeningPort = 49950;
|
||||||
|
|
||||||
|
// template path from SaveShardRoot to find character saves
|
||||||
|
SaveTemplatePath = "$shard/characters/account_$userid_$charid$ext";
|
||||||
|
|
||||||
|
// character saves possible extension list
|
||||||
|
SaveExtList = "_pdr.bin _pdr.xml .bin";
|
||||||
|
|
||||||
|
//BSFilePrefix = "R:/code/ryzom/r2_shard/";
|
||||||
|
//BSFileSubst = "r2_shard/";
|
@ -0,0 +1,5 @@
|
|||||||
|
L3BSPort = "49950";
|
||||||
|
BSHost = "localhost:49990";
|
||||||
|
UseBS = 1;
|
||||||
|
// Root directory where data from shards are stored into
|
||||||
|
SaveShardRoot = "../save/";
|
@ -0,0 +1,27 @@
|
|||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "common.cfg";
|
||||||
|
|
||||||
|
DisplayedVariables += { "", "SlowestService", "SlowestTock", "", "WaitingForServices", "", "@Pause|pause" };
|
||||||
|
|
||||||
|
NegFiltersDebug = { "DELTA_", "DEFAULT_CB", "LNETL", };
|
||||||
|
NegFiltersInfo = { "HNETL5" };
|
||||||
|
|
||||||
|
Paths += { };
|
||||||
|
|
||||||
|
StartCommands =
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
DontUseNS = 1;
|
||||||
|
|
||||||
|
SId = 4;
|
||||||
|
|
||||||
|
ListeningPort = 49990;
|
||||||
|
|
||||||
|
// Listening port for the Web server to connect in
|
||||||
|
WebPort = 49898;
|
||||||
|
|
||||||
|
BSReadState = 0;
|
||||||
|
MasterBSHost = "192.168.1.134:49990";
|
||||||
|
BSFileSubst = "/home/nevrax/save_shard";
|
||||||
|
BSFilePrefix = "/home/nevrax/save_shard_slave";
|
@ -0,0 +1,3 @@
|
|||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "common.cfg";
|
||||||
|
|
@ -0,0 +1,106 @@
|
|||||||
|
// ---- config local variables
|
||||||
|
|
||||||
|
// Used by ConfigFile in EGS and WS
|
||||||
|
ShardId = #SHARDID#;
|
||||||
|
|
||||||
|
// Used by CVariable in WS
|
||||||
|
PlayerLimit = 5000;
|
||||||
|
|
||||||
|
Paths += {
|
||||||
|
"../common/",
|
||||||
|
};
|
||||||
|
|
||||||
|
// Used to connect to AES (this file) and to set up AES service (admin_executor_service.cfg)
|
||||||
|
AESPort="46702";
|
||||||
|
AESHost="localhost";
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
WindowStyle = "WIN";
|
||||||
|
|
||||||
|
// don't connect to the old NeLNS AES
|
||||||
|
DontUseAES = 1;
|
||||||
|
|
||||||
|
// Configure module gateway for layer 5 module comm
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
// Create a gateway module
|
||||||
|
"moduleManager.createModule StandardGateway gw",
|
||||||
|
// add a layer 5 transport
|
||||||
|
"gw.transportAdd L5Transport l5",
|
||||||
|
// open the transport
|
||||||
|
"gw.transportCmd l5(open)",
|
||||||
|
|
||||||
|
/// Create default connection with admin executor service
|
||||||
|
// Create a gateway module
|
||||||
|
"moduleManager.createModule StandardGateway gw_aes",
|
||||||
|
// create the admin executor service module
|
||||||
|
"moduleManager.createModule AdminExecutorServiceClient aes_client",
|
||||||
|
"aes_client.plug gw_aes",
|
||||||
|
|
||||||
|
// create a layer 3 client to connect to aes gateway
|
||||||
|
"gw_aes.transportAdd L3Client aes_l3c",
|
||||||
|
"gw_aes.transportCmd aes_l3c(connect addr="+AESHost+":"+AESPort+")",
|
||||||
|
};
|
||||||
|
|
||||||
|
NSHost = "localhost";
|
||||||
|
|
||||||
|
// A list of vars to graph for any service
|
||||||
|
GraphVars +=
|
||||||
|
{
|
||||||
|
"ProcessUsedMemory", "60000", // every minute
|
||||||
|
};
|
||||||
|
|
||||||
|
IgnoredFiles = { "continent.cfg", "__read_me.txt", "bandit.html", "flora_primr.primitive" };
|
||||||
|
|
||||||
|
// Set a mainland SessionId.
|
||||||
|
// Live: Must be 0 for ring shards, non-zero (usually ShardId) for mainland shards
|
||||||
|
// Dev: Can be non-zero to initially connect a client to a ring shard
|
||||||
|
NoWSShardId = ShardId;
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by CVariable class)
|
||||||
|
|
||||||
|
// Disable generation / display of nldebug messages
|
||||||
|
DisableNLDebug = 1;
|
||||||
|
|
||||||
|
// Disable nel net verbose logging
|
||||||
|
VerboseNETTC = 0;
|
||||||
|
VerboseLNETL0 = 0;
|
||||||
|
VerboseLNETL1 = 0;
|
||||||
|
VerboseLNETL2 = 0;
|
||||||
|
VerboseLNETL3 = 0;
|
||||||
|
VerboseLNETL4 = 0;
|
||||||
|
VerboseLNETL5 = 0;
|
||||||
|
VerboseLNETL6 = 0;
|
||||||
|
|
||||||
|
// If the update loop is too slow, a thread will produce an assertion.
|
||||||
|
// By default, the value is set to 10 minutes.
|
||||||
|
// Set to 0 for no assertion.
|
||||||
|
UpdateAssertionThreadTimeout = 6000000;
|
||||||
|
|
||||||
|
// how to sleep between 2 network updates
|
||||||
|
// 0 = pipe
|
||||||
|
// 1 = usleep
|
||||||
|
// 2 = nanosleep
|
||||||
|
// 3 = sched_yield
|
||||||
|
// 4 = nothing
|
||||||
|
UseYieldMethod = 0;
|
||||||
|
|
||||||
|
DefaultMaxExpectedBlockSize = 200000000; // 200 M !
|
||||||
|
DefaultMaxSentBlockSize = 200000000; // 200 M !
|
||||||
|
|
||||||
|
// Will SaveFilesDirectory will be converted to a full path?
|
||||||
|
ConvertSaveFilesDirectoryToFullPath = 0;
|
||||||
|
|
||||||
|
// Where to save specific shard data (ie: player backup), relatively to SaveShardRoot
|
||||||
|
SaveFilesDirectory = "";
|
||||||
|
|
||||||
|
// where to save generic shard data (ie: packed_sheet)
|
||||||
|
WriteFilesDirectory = "../data/leveldesign";
|
||||||
|
|
||||||
|
MongoPassword = "feFrvs3rfdcef4";
|
||||||
|
|
||||||
|
|
||||||
|
// ---- service custom variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
// ---- service custom variables (used by CVariable class)
|
@ -0,0 +1,302 @@
|
|||||||
|
// Auto generated config file
|
||||||
|
// Use with commandline: dynamic_scenario_service -C. -L. --nobreak --writepid
|
||||||
|
AESAliasName= "dss";
|
||||||
|
|
||||||
|
ASWebPort="46700";
|
||||||
|
ASPort="46701";
|
||||||
|
AESPort="46702";
|
||||||
|
SUPort = 50505;
|
||||||
|
SUGlobalPort = 50503;
|
||||||
|
L3BSPort = "49950";
|
||||||
|
L3SlaveBSPort = "49951";
|
||||||
|
L3MasterLGSPort = 49992;
|
||||||
|
LGSBSPort = 49994;
|
||||||
|
L3LGSBSPort = 49995;
|
||||||
|
SUHost = "localhost";
|
||||||
|
MFSHost = "localhost";
|
||||||
|
BSHost = "localhost:49990";
|
||||||
|
SlaveBSHost = "";
|
||||||
|
MasterLGSHost = "localhost";
|
||||||
|
SlaveLGSHost = "localhost";
|
||||||
|
LGSBSHost = "localhost";
|
||||||
|
DBHost = "localhost";
|
||||||
|
#define DONT_USE_LGS_SLAVE
|
||||||
|
// Configure module gateway for layer 5 module comm
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
// Create a gateway module
|
||||||
|
"moduleManager.createModule StandardGateway gw",
|
||||||
|
// add a layer 5 transport
|
||||||
|
"gw.transportAdd L5Transport l5",
|
||||||
|
// open the transport
|
||||||
|
"gw.transportCmd l5(open)",
|
||||||
|
|
||||||
|
/// Create default connection with admin executor service
|
||||||
|
// Create a gateway module
|
||||||
|
"moduleManager.createModule StandardGateway gw_aes",
|
||||||
|
// create the admin executor service module
|
||||||
|
"moduleManager.createModule AdminExecutorServiceClient aes_client",
|
||||||
|
"aes_client.plug gw_aes",
|
||||||
|
|
||||||
|
// create a layer 3 client to connect to aes gateway
|
||||||
|
"gw_aes.transportAdd L3Client aes_l3c",
|
||||||
|
"gw_aes.transportCmd aes_l3c(connect addr=localhost:"+AESPort+")",
|
||||||
|
};
|
||||||
|
|
||||||
|
/// A list of vars to graph for any service
|
||||||
|
GraphVars =
|
||||||
|
{
|
||||||
|
"ProcessUsedMemory", "60000", // every minute
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* Force default value for PDLib directory (e.g. SaveFilesDirectory...)
|
||||||
|
* PLEASE NOTICE THAT THIS LINE MUST BE LEFT TO ""
|
||||||
|
* Only log analyser must have the $shard parameter to find all shards root directory
|
||||||
|
*/
|
||||||
|
PDRootDirectory = "";
|
||||||
|
|
||||||
|
// Log PD updates to log file (1 enabled, 0 disabled), see PDLogSaveDirectory to choose where to log
|
||||||
|
PDEnableLog = 1;
|
||||||
|
|
||||||
|
// Log PD StringManager updates to log file (1 enabled, 0 disabled), see PDLogSaveDirectory to choose where to log
|
||||||
|
PDEnableStringLog = 0;
|
||||||
|
|
||||||
|
// Number of seconds between 2 logs to file
|
||||||
|
PDLogUpdate = 10;
|
||||||
|
|
||||||
|
// MySGL wrapper strict mode - controls use of asserts if SQL requests fail
|
||||||
|
MSWStrictMode=0;
|
||||||
|
|
||||||
|
// This is the mapping for logical continent to physical one
|
||||||
|
ContinentNameTranslator =
|
||||||
|
{
|
||||||
|
"matis_newbie", "matis",
|
||||||
|
"zorai_newbie", "zorai",
|
||||||
|
"terre", "terre_oubliee",
|
||||||
|
"sources", "sources_interdites"
|
||||||
|
};
|
||||||
|
|
||||||
|
NegFiltersDebug = { "ZZZZZZZZZZZ" };
|
||||||
|
NegFiltersInfo = { "ZZZZZZZZZZZ" };
|
||||||
|
NegFiltersWarning = { "ZZZZZZZZZZZ", "Missing log context for log" };
|
||||||
|
//NegFiltersDebug = { "NET", "ADMIN", "MIRROR", "NC", "PATH" };
|
||||||
|
//NegFiltersInfo = { "NET", "ADMIN", "MIRROR", "NC", "CF", "TimerManagerUpdate" };
|
||||||
|
// NegFiltersWarning = { "CT_LRC", "AnimalSpawned" };
|
||||||
|
|
||||||
|
// Block the system in the tick service that provokes stalls when overloaded
|
||||||
|
WaitForBSThreshold=0;
|
||||||
|
|
||||||
|
// Only produce log*.log files and not <service name>*.log
|
||||||
|
DontLog=1;
|
||||||
|
|
||||||
|
IgnoredFiles = { "continent.cfg", "__read_me.txt", "bandit.html", "flora_primr.primitive" };
|
||||||
|
|
||||||
|
// If the update loop is too slow, a thread will produce an assertion.
|
||||||
|
// By default, the value is set to 10 minutes.
|
||||||
|
// Set to 0 for no assertion.
|
||||||
|
UpdateAssertionThreadTimeout = 6000000;
|
||||||
|
|
||||||
|
DefaultMaxExpectedBlockSize = 200000000; // 200 M !
|
||||||
|
DefaultMaxSentBlockSize = 200000000; // 200 M !
|
||||||
|
|
||||||
|
// MS Packet size limit in bytes, PER DATASET (warning: depending on the weights, limits per property may be very small)
|
||||||
|
MaxOutBandwidth = 100000000;
|
||||||
|
|
||||||
|
// how to sleep between 2 network updates
|
||||||
|
// 0 = pipe
|
||||||
|
// 1 = usleep
|
||||||
|
// 2 = nanosleep
|
||||||
|
// 3 = sched_yield
|
||||||
|
// 4 = nothing
|
||||||
|
UseYieldMethod = 0;
|
||||||
|
|
||||||
|
// The privileges needed to access any ring session
|
||||||
|
PrivilegeForSessionAccess = ":DEV:SGM:GM:SG:";
|
||||||
|
|
||||||
|
// The max number of ring points (aka ring access) for each ecosystem
|
||||||
|
MaxRingPoints = "A1:D7:F7:J8:L6:R13";
|
||||||
|
|
||||||
|
// Level limit for newb scenarios
|
||||||
|
FreeTrialSkillLimit=125;
|
||||||
|
|
||||||
|
// Level limit for newb scenarios
|
||||||
|
DefaultInterShardExchangeLevelCap=0;
|
||||||
|
|
||||||
|
// Configureation for DSS
|
||||||
|
MaxNpcs = 300;
|
||||||
|
MaxStaticObjects = 200;
|
||||||
|
|
||||||
|
// the following variable must be defined but should be empty - it's presence is used to change the behaviour
|
||||||
|
// of the packed sheet reader
|
||||||
|
GeorgePaths = { "" };
|
||||||
|
|
||||||
|
// Dissable nel net verbose logging
|
||||||
|
VerboseNETTC = 0;
|
||||||
|
VerboseLNETL0 = 0;
|
||||||
|
VerboseLNETL1 = 0;
|
||||||
|
VerboseLNETL2 = 0;
|
||||||
|
VerboseLNETL3 = 0;
|
||||||
|
VerboseLNETL4 = 0;
|
||||||
|
VerboseLNETL5 = 0;
|
||||||
|
VerboseLNETL6 = 0;
|
||||||
|
|
||||||
|
// Dissable ryzom verbose logging
|
||||||
|
VerboseMIRROR = 0;
|
||||||
|
VerboseRingRPLog = 0;
|
||||||
|
VerboseCDBGroup = 0;
|
||||||
|
|
||||||
|
// What to do with characters coming from another mainland shard?
|
||||||
|
// 0: teleport to the stored session id
|
||||||
|
// 1: let the character play anyway, but leave the stored session id unchanged
|
||||||
|
// 2: assign the stored session id with FixedSessionId and let play
|
||||||
|
AllowCharsFromAllSessions = 0;
|
||||||
|
|
||||||
|
// Use Shard Unifier or not
|
||||||
|
DontUseSU = 0;
|
||||||
|
|
||||||
|
// the domain's set of useful addresses
|
||||||
|
LSHost = SUHost;
|
||||||
|
RSMHost = SUHost;
|
||||||
|
|
||||||
|
// MFS config
|
||||||
|
WebSrvUsersDirectory = "";
|
||||||
|
WebRootDirectory = "/home/nevrax/live/save_shard/www";
|
||||||
|
HoFHDTDirectory = "/local/www/hof/hdt";
|
||||||
|
|
||||||
|
// BS Specifics --------------------------------------------------------------------------
|
||||||
|
// BS - set to 1 if a BS is not part of a naming service group (then BS not disclosed
|
||||||
|
// to other services by the Layer 5, i.e. the services sending requests to BS have
|
||||||
|
// to know its/their address(es) by another mean)
|
||||||
|
BSDontUseNS = 1;
|
||||||
|
// BS - set the host of the naming service where the BS register
|
||||||
|
BSNSHost = "localhost";
|
||||||
|
UseBS = 1;
|
||||||
|
XMLSave = 0;
|
||||||
|
|
||||||
|
// Where to save specific shard data (ie: player backup), relatively to SaveShardRoot
|
||||||
|
SaveFilesDirectory = "";
|
||||||
|
|
||||||
|
// where to save generic shard data (ie: packed_sheet)
|
||||||
|
WriteFilesDirectory = "../data";
|
||||||
|
|
||||||
|
// Will SaveFilesDirectory will be converted to a full path?
|
||||||
|
ConvertSaveFilesDirectoryToFullPath = 0;
|
||||||
|
|
||||||
|
// BS - Root directory where data are backuped to
|
||||||
|
IncrementalBackupDirectory = "../backup";
|
||||||
|
|
||||||
|
// IOS - Directory to store ios.string_cache file
|
||||||
|
StringManagerCacheDirectory = "../cache";
|
||||||
|
|
||||||
|
// IOS - Directory to log chat into
|
||||||
|
LogChatDirectory = "../logs";
|
||||||
|
|
||||||
|
// MFS - Directories
|
||||||
|
WebRootDirectory = "../cache/www";
|
||||||
|
|
||||||
|
// Root directory where data from shards are stored into
|
||||||
|
SaveShardRoot = "../save/";
|
||||||
|
|
||||||
|
// SU Specifics --------------------------------------------------------------------------
|
||||||
|
// SU - set to 1 if SU didn't use a naming service
|
||||||
|
SUDontUseNS = 1;
|
||||||
|
// SU - host for the NS used by SU
|
||||||
|
SUNSHost = "localhost";
|
||||||
|
// SU - listen address of the SU service (for L5 connections)
|
||||||
|
SUAddress = SUHost+":"+SUPort;
|
||||||
|
// SU - nel and ring database names
|
||||||
|
DBNelName = "nel";
|
||||||
|
DBRingName = "ring_open";
|
||||||
|
// Nel DB user
|
||||||
|
DBNelUser = "open";
|
||||||
|
// Ring DB user
|
||||||
|
DBRingUser = "open";
|
||||||
|
// SU - password to access to the nel database with DBNelUseruser (default is no password)
|
||||||
|
DBNelPass = "";
|
||||||
|
// SU - password to access to the ring database with DBRingUser (default is no password)
|
||||||
|
DBRingPass = "";
|
||||||
|
|
||||||
|
// WS Specifics --------------------------------------------------------------------------
|
||||||
|
// WS - use or not the legacy WelcomeService from nel ns (only for backward compatibility during transition to ring)
|
||||||
|
DontUseLSService = 1;
|
||||||
|
|
||||||
|
// Global config --------------------------------------------------------------------------
|
||||||
|
// set to 0 if you want to use the admin system
|
||||||
|
DontUseAES = 1;
|
||||||
|
|
||||||
|
// Dissable generation / display of nldebug messages
|
||||||
|
DissableNLDebug = 1;
|
||||||
|
DisableNLDebug = 1;
|
||||||
|
ShardId = #SHARDID#;
|
||||||
|
BasePort = 51400;
|
||||||
|
SaveFilesDirectory="open_ring01/";
|
||||||
|
NSHost = "localhost";
|
||||||
|
// Player limits (AIS, EGS, WS, FS)
|
||||||
|
NbPlayersLimit = 5000;
|
||||||
|
NbGuildLimit = 15000;
|
||||||
|
PlayerLimit = NbPlayersLimit;
|
||||||
|
ClientLimit = 1000;
|
||||||
|
|
||||||
|
// Set this shard as a ring (1) or mainland (0) shard (main behavior switch)
|
||||||
|
IsRingShard = 1;
|
||||||
|
|
||||||
|
// Set a mainland SessionId.
|
||||||
|
// Live: Must be 0 for ring shards, non-zero (usually ShardId) for mainland shards
|
||||||
|
// Dev: Can be non-zero to initially connect a client to a ring shard
|
||||||
|
NoWSShardId = ShardId;
|
||||||
|
FixedSessionId = 0;
|
||||||
|
|
||||||
|
// Mirror limits
|
||||||
|
DatasetSizefe_temp = 700000;
|
||||||
|
DatasetSizefame = 26000;
|
||||||
|
|
||||||
|
// FS Specifics --------------------------------------------------------------------------
|
||||||
|
// Client bandwidth ratio, set to 1 for standard operation, more than one allocate more bandwidth
|
||||||
|
BandwidthRatio = 2;
|
||||||
|
|
||||||
|
// EGS Specifics --------------------------------------------------------------------------
|
||||||
|
// Entity Limits (EGS)
|
||||||
|
NbObjectsLimit = 2000;
|
||||||
|
NbNpcSpawnedByEGSLimit = 5000;
|
||||||
|
NbForageSourcesLimit = 10000;
|
||||||
|
NbToxicCloudsLimit = 5000;
|
||||||
|
|
||||||
|
// AIS Specifics --------------------------------------------------------------------------
|
||||||
|
// Entity Limits (AIS)
|
||||||
|
NbPetLimit = NbPlayersLimit*4;
|
||||||
|
NbFaunaLimit = 50000;
|
||||||
|
NbNpcLimit = 50000;
|
||||||
|
NbFxLimit = 500;
|
||||||
|
|
||||||
|
FSListenHost = "localhost";
|
||||||
|
#include "dynamic_scenario_service_default.cfg"
|
||||||
|
WriteFilesDirectory="../live/service_dynamic_scenario_service/";
|
||||||
|
DontLog = 1;
|
||||||
|
WebSrvHost = "http://localhost:50000/";
|
||||||
|
Mainlands = {
|
||||||
|
"#SHARDID#", "#UC_SHARDNAME#", "(#UC_SHARDNAME# Developer Community)", "en"
|
||||||
|
};
|
||||||
|
HomeMainlandNames =
|
||||||
|
{
|
||||||
|
"#SHARDID#", "#UC_SHARDNAME#", "#SHARDNAME#",
|
||||||
|
};
|
||||||
|
RRDVarPath = "../save/rrd_graphs";
|
||||||
|
NegFiltersInfo+= {"FESTATS", "FETIME", "FERECV", "FESEND: sent SYNC message to client 1", "EIT: Register EId"};
|
||||||
|
NegFiltersWarning+= {"PIPO_SESSION1", "casino_session_matis01", "invalid damage type 10", "_log_Item_Delete",
|
||||||
|
"_log_Item_Money", "_log_Item_Create", "_log_Item_Move", "botChatMissionAdvance> invalid index 0",
|
||||||
|
"_MaxRange(0) < _MinRange(1)", "Can't find craft plan sheet 'unknown.unknown'"};
|
||||||
|
DontUseAES=1;
|
||||||
|
RingRPEnabled=0;
|
||||||
|
DomainName = "#DOMAINNAME#";
|
||||||
|
EnableStlAllocatorChecker = 0;
|
||||||
|
// start commands for setting up the exchange level caps of different ryzom shards
|
||||||
|
StartCommands += { "setShardExchangeLimit #SHARDID# 250" };
|
||||||
|
StartCommands += { "displayShardExchangeLimits" };
|
||||||
|
StartCommands += { "EnableStlAllocatorChecker 0" };
|
||||||
|
|
||||||
|
Paths += {
|
||||||
|
".",
|
||||||
|
"../common/data_common",
|
||||||
|
"../common/data_leveldesign",
|
||||||
|
};
|
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
DelayBeforeStartAct = 1;
|
||||||
|
MaxNpcs = 300;
|
||||||
|
MaxStaticObjects = 200;
|
||||||
|
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
"unifiedNetwork.addService ShardUnifier ( address="+SUAddress+" sendId external autoRetry )",
|
||||||
|
};
|
@ -0,0 +1,4 @@
|
|||||||
|
WordsPath = "../tools/translation/work/";
|
||||||
|
LanguageCode = "en";
|
||||||
|
Filter = "item";
|
||||||
|
Utf8 = 0;
|
@ -0,0 +1,236 @@
|
|||||||
|
// Use with commandline: entities_game_service -C. -L. --nobreak --writepid
|
||||||
|
|
||||||
|
// ---- config local variables
|
||||||
|
|
||||||
|
#define DONT_USE_LGS_SLAVE
|
||||||
|
|
||||||
|
AESPort="46702";
|
||||||
|
SUPort = 50505;
|
||||||
|
SUGlobalPort = 50503;
|
||||||
|
L3MasterLGSPort = 41292;
|
||||||
|
L3SlaveLGSPort = 49993;
|
||||||
|
SUHost = "localhost";
|
||||||
|
MasterLGSHost = "localhost";
|
||||||
|
SlaveLGSHost = "localhost";
|
||||||
|
// SU - listen address of the SU service (for L5 connections)
|
||||||
|
SUAddress = SUHost+":"+SUPort;
|
||||||
|
|
||||||
|
#include "entities_game_service_default.cfg"
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
AESAliasName= "egs";
|
||||||
|
|
||||||
|
StartCommands += {
|
||||||
|
"moduleManager.createModule AnimSessionManager asm",
|
||||||
|
"asm.plug gw",
|
||||||
|
};
|
||||||
|
|
||||||
|
// start commands for setting up the exchange level caps of different ryzom shards
|
||||||
|
StartCommands += { "setShardExchangeLimit #SHARDID# 250" };
|
||||||
|
|
||||||
|
StartCommands += { "displayShardExchangeLimits" };
|
||||||
|
StartCommands += { "EnableStlAllocatorChecker 0" };
|
||||||
|
|
||||||
|
GraphVars += { "CharacterLoadPerTick", "0" };
|
||||||
|
GraphVars += { "CharacterLoadPerTick", "60000" };
|
||||||
|
GraphVars += { "CharacterSavePerTick", "0" };
|
||||||
|
GraphVars += { "CharacterSavePerTick", "60000" };
|
||||||
|
GraphVars += { "TickSpeedLoop", "0" };
|
||||||
|
GraphVars += { "TickSpeedLoop", "60000" };
|
||||||
|
GraphVars += { "L5CallbackCount", "0" };
|
||||||
|
GraphVars += { "L5CallbackCount", "60000" };
|
||||||
|
GraphVars += { "L5CallbackTime", "0" };
|
||||||
|
GraphVars += { "L5CallbackTime", "60000" };
|
||||||
|
GraphVars += { "MirrorCallbackCount", "0" };
|
||||||
|
GraphVars += { "MirrorCallbackCount", "60000" };
|
||||||
|
GraphVars += { "MirrorCallbackTime", "0" };
|
||||||
|
GraphVars += { "MirrorCallbackTime", "60000" };
|
||||||
|
|
||||||
|
NSHost = "localhost";
|
||||||
|
|
||||||
|
Paths += {
|
||||||
|
"../data",
|
||||||
|
"../common/data_leveldesign",
|
||||||
|
};
|
||||||
|
PathsNoRecurse= {"."};
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by CVariable class)
|
||||||
|
|
||||||
|
// ---- service custom variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
WebSrvHost = "#WEBHOST#";
|
||||||
|
|
||||||
|
NbPlayersLimit = PlayerLimit;
|
||||||
|
NbGuildLimit = 15000;
|
||||||
|
|
||||||
|
// Entity Limits (EGS)
|
||||||
|
NbObjectsLimit = 2000;
|
||||||
|
NbNpcSpawnedByEGSLimit = 5000;
|
||||||
|
NbForageSourcesLimit = 10000;
|
||||||
|
NbToxicCloudsLimit = 5000;
|
||||||
|
|
||||||
|
#include "used_continents.cfg"
|
||||||
|
|
||||||
|
// define the primitives configuration used.
|
||||||
|
UsedPrimitives =
|
||||||
|
{
|
||||||
|
"newbieland_all",
|
||||||
|
// "newbieland",
|
||||||
|
"matis_newbie_all",
|
||||||
|
// "matis_newbieland",
|
||||||
|
|
||||||
|
"matis_all",
|
||||||
|
// "matis_majesticgarden",
|
||||||
|
// "matis_fleetinggarden",
|
||||||
|
// "matis_groveofconfusion",
|
||||||
|
// "matis_hereticshovel",
|
||||||
|
// "matis_hiddensource",
|
||||||
|
// "matis_knollofdissent",
|
||||||
|
// "matis_upperbog",
|
||||||
|
|
||||||
|
"matis_island_all",
|
||||||
|
|
||||||
|
"zorai_newbie_all",
|
||||||
|
// "zorai_newbieland",
|
||||||
|
|
||||||
|
"zorai_all",
|
||||||
|
// "zorai_citiesofintuition",
|
||||||
|
// "zorai_maidengrove",
|
||||||
|
// "zorai_groveofumbra",
|
||||||
|
// "zorai_havenofpurity",
|
||||||
|
// "zorai_knotofdementia",
|
||||||
|
// "zorai_thevoid",
|
||||||
|
|
||||||
|
"zorai_island_all",
|
||||||
|
|
||||||
|
"fyros_newbie_all",
|
||||||
|
// "fyros_newbieland",
|
||||||
|
|
||||||
|
"fyros_all",
|
||||||
|
// "fyros_imperialdune",
|
||||||
|
// "fyros_oflovaksoasis",
|
||||||
|
// "fyros_frahartowers",
|
||||||
|
// "fyros_dunesofexil",
|
||||||
|
// "fyros_outlawcanyon",
|
||||||
|
// "fyros_sawdustmines",
|
||||||
|
// "fyros_thesavagedunes",
|
||||||
|
// "fyros_thescorchedcorridor",
|
||||||
|
|
||||||
|
"fyros_island_all",
|
||||||
|
|
||||||
|
"tryker_newbie_all",
|
||||||
|
// "tryker_newbieland",
|
||||||
|
|
||||||
|
"tryker_all",
|
||||||
|
// "tryker_bountybeaches",
|
||||||
|
// "tryker_enchantedisle",
|
||||||
|
// "tryker_lagoonsofloria",
|
||||||
|
// "tryker_libertylake",
|
||||||
|
// "tryker_thefount",
|
||||||
|
// "tryker_windsofmuse",
|
||||||
|
|
||||||
|
"tryker_island_all",
|
||||||
|
|
||||||
|
|
||||||
|
"terre_all",
|
||||||
|
// "terre_forbidden_depths",
|
||||||
|
// "terre_the_land_of_continuty",
|
||||||
|
// "terre_the_sunken_city",
|
||||||
|
"sources_all",
|
||||||
|
// "sources_the_under_spring",
|
||||||
|
"route_gouffre_all",
|
||||||
|
// "route_gouffre_gate_of_obscurity",
|
||||||
|
// "route_gouffre_the_elusive_forest",
|
||||||
|
// "route_gouffre_the_trench_of_trials",
|
||||||
|
// "route_gouffre_the_windy_gate",
|
||||||
|
"nexus_all",
|
||||||
|
// "nexus_nexus",
|
||||||
|
"bagne_all",
|
||||||
|
// "bagne_the_abyss_of_ichor",
|
||||||
|
|
||||||
|
"kitiniere_all",
|
||||||
|
// "kitiniere",
|
||||||
|
//ace kitiniere+tcm "corrupted_moor_all",
|
||||||
|
"r2_desert_all",
|
||||||
|
"r2_lakes_all",
|
||||||
|
"r2_forest_all",
|
||||||
|
"r2_jungle_all",
|
||||||
|
"r2_roots_all",
|
||||||
|
};
|
||||||
|
|
||||||
|
// the following variable must be defined but should be empty - it's presence is used to change the behaviour
|
||||||
|
// of the packed sheet reader
|
||||||
|
GeorgePaths = { "" };
|
||||||
|
|
||||||
|
HomeMainlandNames =
|
||||||
|
{
|
||||||
|
"#SHARDID#", "#UC_SHARDNAME#", "#SHARDNAME#",
|
||||||
|
};
|
||||||
|
|
||||||
|
// Mirror limits
|
||||||
|
DatasetSizefe_temp = 700000;
|
||||||
|
DatasetSizefame = 26000;
|
||||||
|
|
||||||
|
// ---- service custom variables (used by CVariable class)
|
||||||
|
|
||||||
|
RingRPEnabled=0;
|
||||||
|
RingRPXPRequiredPerAction=700;
|
||||||
|
RingRPXPRequiredPerTimeSlice=700;
|
||||||
|
|
||||||
|
MaxXPGainPerPlayer = 30.0;
|
||||||
|
DeathXPFactor = 0.1;
|
||||||
|
|
||||||
|
MFSHost = "localhost";
|
||||||
|
|
||||||
|
// Use Shard Unifier or not
|
||||||
|
DontUseSU = 0;
|
||||||
|
|
||||||
|
// Set this shard as a ring (1) or mainland (0) shard (main behavior switch)
|
||||||
|
IsRingShard = 0;
|
||||||
|
|
||||||
|
// Set a mainland SessionId.
|
||||||
|
// Live: Must be 0 for ring shards, non-zero (usually ShardId) for mainland shards
|
||||||
|
// Dev: Can be non-zero to initially connect a client to a ring shard
|
||||||
|
FixedSessionId = ShardId;
|
||||||
|
|
||||||
|
// Level limit for newb scenarios
|
||||||
|
DefaultInterShardExchangeLevelCap=0;
|
||||||
|
|
||||||
|
// Disable ryzom verbose logging
|
||||||
|
VerboseMIRROR = 0;
|
||||||
|
VerboseRingRPLog = 0;
|
||||||
|
VerboseCDBGroup = 0;
|
||||||
|
|
||||||
|
MissionLogFile = "../logs/egs_missions.log";
|
||||||
|
AdminLogFile = "../logs/admin_commands.log";
|
||||||
|
|
||||||
|
// What to do with characters coming from another mainland shard?
|
||||||
|
// 0: teleport to the stored session id
|
||||||
|
// 1: let the character play anyway, but leave the stored session id unchanged
|
||||||
|
// 2: assign the stored session id with FixedSessionId and let play
|
||||||
|
AllowCharsFromAllSessions = 0;
|
||||||
|
|
||||||
|
/* Force default value for PDLib directory (e.g. SaveFilesDirectory...)
|
||||||
|
* PLEASE NOTICE THAT THIS LINE MUST BE LEFT TO ""
|
||||||
|
* Only log analyser must have the $shard parameter to find all shards root directory
|
||||||
|
*/
|
||||||
|
PDRootDirectory = "";
|
||||||
|
|
||||||
|
// Log PD updates to log file (1 enabled, 0 disabled), see PDLogSaveDirectory to choose where to log
|
||||||
|
PDEnableLog = 1;
|
||||||
|
|
||||||
|
// Log PD StringManager updates to log file (1 enabled, 0 disabled), see PDLogSaveDirectory to choose where to log
|
||||||
|
PDEnableStringLog = 0;
|
||||||
|
|
||||||
|
// Number of seconds between 2 logs to file
|
||||||
|
PDLogUpdate = 10;
|
||||||
|
|
||||||
|
#include "backup_service_interface.cfg"
|
||||||
|
|
||||||
|
XMLSave = 0;
|
||||||
|
|
||||||
|
ArkSalt="#ARKSALT#";
|
||||||
|
|
||||||
|
//AdminCommandAuditHost = "app.ryzom.com";
|
||||||
|
//AdminCommandAuditPage = "/audit_gm.php";
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,26 @@
|
|||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "common.cfg";
|
||||||
|
|
||||||
|
//NSHost = "itsalive2";
|
||||||
|
//NSHost = "pc27";
|
||||||
|
//NSHost = "ldserver01";
|
||||||
|
//NSHost = "gamedev4";
|
||||||
|
//NSHost = "stephanec";
|
||||||
|
NSHost = "localhost";
|
||||||
|
NSPort = 50000;
|
||||||
|
|
||||||
|
WindowStyle = "WIN";
|
||||||
|
|
||||||
|
StartCommands =
|
||||||
|
{
|
||||||
|
// "goTo 17960 -33180 10",
|
||||||
|
// "goTo 16240 -24800 10",
|
||||||
|
// "goTo 1760 -1440 60",
|
||||||
|
"goTo 2520 -2100 -5",
|
||||||
|
"setUpdateTimeout 100",
|
||||||
|
};
|
||||||
|
|
||||||
|
Paths += { "data_leveldesign", "data_shard" };
|
||||||
|
|
||||||
|
DontUseAES = 1;
|
||||||
|
|
@ -0,0 +1,6 @@
|
|||||||
|
RootConfigFilename = "general_utilities_service_events.cfg";
|
||||||
|
|
||||||
|
Users +=
|
||||||
|
{
|
||||||
|
// "user_name pass_phrase"
|
||||||
|
};
|
@ -0,0 +1,53 @@
|
|||||||
|
// Use with commandline: frontend_service -C. -L. --nobreak --writepid
|
||||||
|
|
||||||
|
// ---- config local variables
|
||||||
|
|
||||||
|
// Client bandwidth ratio, set to 1 for standard opration, more than one allocate more bandwidth
|
||||||
|
BandwidthRatio = 1;
|
||||||
|
|
||||||
|
FSUDPPort = 47851;
|
||||||
|
|
||||||
|
FSListenHost = "#HOSTNAME#";
|
||||||
|
|
||||||
|
#include "frontend_service_default.cfg"
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
AESAliasName= "fes";
|
||||||
|
|
||||||
|
GraphVars += { "TickSpeedLoop", "0" };
|
||||||
|
GraphVars += { "TickSpeedLoop", "60000" };
|
||||||
|
GraphVars += { "L5CallbackCount", "0" };
|
||||||
|
GraphVars += { "L5CallbackCount", "60000" };
|
||||||
|
GraphVars += { "L5CallbackTime", "0" };
|
||||||
|
GraphVars += { "L5CallbackTime", "60000" };
|
||||||
|
GraphVars += { "MirrorCallbackCount", "0" };
|
||||||
|
GraphVars += { "MirrorCallbackCount", "60000" };
|
||||||
|
GraphVars += { "MirrorCallbackTime", "0" };
|
||||||
|
GraphVars += { "MirrorCallbackTime", "60000" };
|
||||||
|
|
||||||
|
Paths += {
|
||||||
|
"../data",
|
||||||
|
"../common",
|
||||||
|
"../common/data_leveldesign",
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by CVariable class)
|
||||||
|
|
||||||
|
// ---- service custom variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
//AcceptInvalidCookie = 1;
|
||||||
|
|
||||||
|
ClientLimit = 3000;
|
||||||
|
|
||||||
|
// Mirror limits
|
||||||
|
DatasetSizefe_temp = 700000;
|
||||||
|
DatasetSizefame = 26000;
|
||||||
|
|
||||||
|
// ---- service custom variables (used by CVariable class)
|
||||||
|
|
||||||
|
// Disable ryzom verbose logging
|
||||||
|
VerboseMIRROR = 0;
|
||||||
|
|
||||||
|
// Root directory where data from shards are stored into
|
||||||
|
SaveShardRoot = "../save/";
|
@ -0,0 +1,104 @@
|
|||||||
|
#include "common.cfg"
|
||||||
|
|
||||||
|
// Configure module gateway for front end operation
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
// Add a security plugin (will add player info on player module proxy)
|
||||||
|
"gw.securityCreate FESecurity",
|
||||||
|
// create a front end service transport
|
||||||
|
"gw.transportAdd FEServer fes",
|
||||||
|
// set the transport option (need PeerInvisible and Firewalled)
|
||||||
|
"gw.transportOptions fes(PeerInvisible Firewalled)",
|
||||||
|
// open the transport
|
||||||
|
"gw.transportCmd fes(open)",
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// UDP port for client communication
|
||||||
|
//FrontendPort = 47851;
|
||||||
|
|
||||||
|
ListenAddress = FSListenHost+":"+FSUDPPort;
|
||||||
|
|
||||||
|
// Maximum size that can be read from a client message
|
||||||
|
DatagramLength = 10000;
|
||||||
|
|
||||||
|
// Time-out before removing a client when it does not send any more data
|
||||||
|
ClientTimeOut = 600000; // 10 min
|
||||||
|
|
||||||
|
// Time-out before removing a limbo client when it does not send any more data
|
||||||
|
LimboTimeOut = 60000; // 1 min
|
||||||
|
|
||||||
|
// Maximum bytes per game cycle sent to all clients (currently not used/implemented)
|
||||||
|
TotalBandwidth = 536870911; // <512 MB : max value for 32 bit bitsize !
|
||||||
|
|
||||||
|
// Maximum bytes per game cycle sent to a client, including all headers
|
||||||
|
ClientBandwidth = 332 * BandwidthRatio; // 332 <=> 13 kbit/s at 5 Hz; 202 <=> 16 kbit/s at 10 Hz
|
||||||
|
|
||||||
|
// Maximum bytes for impulsion channels per datagram sent to a client
|
||||||
|
ImpulsionByteSize0 = 20 * BandwidthRatio;
|
||||||
|
ImpulsionByteSize1 = 200 * BandwidthRatio;
|
||||||
|
ImpulsionByteSize2 = 200 * BandwidthRatio;
|
||||||
|
NbMinimalVisualBytes = 50;
|
||||||
|
|
||||||
|
// Distance/delta ratio that triggers the sending of a position
|
||||||
|
DistanceDeltaRatioForPos = 100;
|
||||||
|
|
||||||
|
// Number of game cycles per front-end cycle
|
||||||
|
GameCycleRatio = 1;
|
||||||
|
// Execution period of distance calculation
|
||||||
|
CalcDistanceExecutionPeriod = 8;
|
||||||
|
// Execution period of position prioritization
|
||||||
|
PositionPrioExecutionPeriod = 2;
|
||||||
|
// Execution period of orientation prioritization
|
||||||
|
OrientationPrioExecutionPeriod = 8;
|
||||||
|
// Execution period of discreet properties prioritization
|
||||||
|
DiscreetPrioExecutionPeriod = 2;
|
||||||
|
|
||||||
|
SortPrioExecutionPeriod = 1;
|
||||||
|
|
||||||
|
// Display or not the "FE" nlinfos
|
||||||
|
DisplayInfo = 1;
|
||||||
|
|
||||||
|
// Prioritizer mode (currently the only mode is 1 for DistanceDelta)
|
||||||
|
PriorityMode = 1;
|
||||||
|
|
||||||
|
// Strategy for selecting pairs to prioritize (Power2WithCeiling=0, Scoring=1)
|
||||||
|
SelectionStrategy = 1;
|
||||||
|
|
||||||
|
// Minimum number of pairs to select for prioritization
|
||||||
|
MinNbPairsToSelect = 2000;
|
||||||
|
|
||||||
|
// Index of client to monitor, or 0 for no monitoring
|
||||||
|
ClientMonitor = 0;
|
||||||
|
|
||||||
|
// Allow or not beeping
|
||||||
|
AllowBeep = 1;
|
||||||
|
|
||||||
|
Lag = 0; // The lag on the simulated network (used by simlag)
|
||||||
|
PacketLoss = 0; // percentage of lost packet (used by simlag)
|
||||||
|
PacketDuplication = 0; // percentage of duplicated packet (used by simlag)
|
||||||
|
PacketDisordering = 0; // percentage of disordered packet (used by simlag) (Lag must be >100 to use disordering)
|
||||||
|
|
||||||
|
// ----------------------------------------
|
||||||
|
// Frontend/Patch mode settings
|
||||||
|
|
||||||
|
// If 1, the frontend server is used in Patch/Frontend mode (0 = only frontend mode, old behaviour)
|
||||||
|
UseWebPatchServer = 1;
|
||||||
|
|
||||||
|
// If 0, the frontend service is in Patch mode at startup, and it won't accept clients unless WS tells it to do so.
|
||||||
|
AcceptClientsAtStartup = 1;
|
||||||
|
|
||||||
|
// Patch URL footer. PatchURL will look like 'http://223.254.124.23:43435/patch'
|
||||||
|
PatchingURLFooter = ":43435/patch";
|
||||||
|
|
||||||
|
// System command to be executed when FS tries to start Web Patch server (ideally at FS startup)
|
||||||
|
StartWebServerSysCommand = "";
|
||||||
|
|
||||||
|
// System command to be executed when FS tries to stop Web Patch server (ideally when FS turns to frontend mode)
|
||||||
|
StopWebServerSysCommand = "";
|
||||||
|
|
||||||
|
// Use Thread for sending
|
||||||
|
UseSendThread = 1;
|
||||||
|
|
||||||
|
// Unidirectional Mirror mode (FS part)
|
||||||
|
ExpediteTOCK = 1;
|
@ -0,0 +1,28 @@
|
|||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "general_utilities_service_default.cfg";
|
||||||
|
|
||||||
|
DontUseAES = 0;
|
||||||
|
DontUseNS = 1;
|
||||||
|
DontUseTS = 1;
|
||||||
|
|
||||||
|
NSHost="localhost";
|
||||||
|
|
||||||
|
Paths += {};
|
||||||
|
//PathsNoRecurse = {"r:/code/ryzom/data_leveldesign/leveldesign/Game_elem"};
|
||||||
|
GeorgePaths = {};
|
||||||
|
WriteFilesDirectory = "";
|
||||||
|
SaveFilesDirectory = "";
|
||||||
|
|
||||||
|
StartCommands =
|
||||||
|
{
|
||||||
|
""
|
||||||
|
|
||||||
|
// ,"modulesAdd gushub 1234"
|
||||||
|
// ,"modulesAdd gusnet localhost:1234"
|
||||||
|
|
||||||
|
// ,"modulesAdd cc test1 2"
|
||||||
|
// ,"ccLoad test.ccs"
|
||||||
|
|
||||||
|
// ,"modulesAdd ce en test1"
|
||||||
|
// ,"ccRun"
|
||||||
|
};
|
@ -0,0 +1,5 @@
|
|||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "general_utilities_service_common.cfg";
|
||||||
|
|
||||||
|
DontUseNS = 1;
|
||||||
|
DontUseTS = 1;
|
@ -0,0 +1,50 @@
|
|||||||
|
// by default, use WIN displayer
|
||||||
|
WindowStyle = "WIN";
|
||||||
|
|
||||||
|
// set to 0 if you want to use the admin system
|
||||||
|
DontUseAES = 1;
|
||||||
|
|
||||||
|
Paths =
|
||||||
|
{
|
||||||
|
"data_shard"
|
||||||
|
};
|
||||||
|
|
||||||
|
PathsNoRecurse =
|
||||||
|
{
|
||||||
|
"data_leveldesign/leveldesign/Game_elem", // for sheet_id.bin
|
||||||
|
};
|
||||||
|
|
||||||
|
// where to save generic shard data (ie: packed_sheet)
|
||||||
|
WriteFilesDirectory = "";
|
||||||
|
|
||||||
|
// where to save specific shard data (ie: player backup)
|
||||||
|
SaveFilesDirectory = "";
|
||||||
|
|
||||||
|
//NegFiltersDebug += { "NET", "ADMIN", "MIRROR", "NC", "PATH" };
|
||||||
|
//NegFiltersInfo += { "NET", "ADMIN", "MIRROR", "NC", "CF", "TimerManagerUpdate" };
|
||||||
|
//NegFiltersWarning += { "CT_LRC", "AnimalSpawned" };
|
||||||
|
|
||||||
|
FontName = "Lucida Console";
|
||||||
|
FontSize = 9;
|
||||||
|
|
||||||
|
// If the update loop is too slow, a thread will produce an assertion.
|
||||||
|
// By default, the value is set to 10 minutes.
|
||||||
|
// Set to 0 for no assertion.
|
||||||
|
UpdateAssertionThreadTimeout = 0;
|
||||||
|
|
||||||
|
DefaultMaxExpectedBlockSize = 200000000; // 200 M !
|
||||||
|
DefaultMaxSentBlockSize = 200000000; // 200 M !
|
||||||
|
|
||||||
|
// how to sleep between to network update
|
||||||
|
// 0 = pipe
|
||||||
|
// 1 = usleep
|
||||||
|
// 2 = nanosleep
|
||||||
|
// 3 = sched_yield
|
||||||
|
// 4 = nothing
|
||||||
|
UseYieldMethod = 0;
|
||||||
|
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
""
|
||||||
|
,"modulesAdd gusnet localhost:44748"
|
||||||
|
};
|
@ -0,0 +1,74 @@
|
|||||||
|
// By default, use WIN displayer
|
||||||
|
WindowStyle = "WIN";
|
||||||
|
|
||||||
|
PathsNoRecurse =
|
||||||
|
{
|
||||||
|
"data_leveldesign/leveldesign/Game_elem", // for sheet_id.bin
|
||||||
|
};
|
||||||
|
|
||||||
|
// set to 0 if you want to use the admin system
|
||||||
|
DontUseAES = 1;
|
||||||
|
DontUseNS = 1;
|
||||||
|
DontUseTS = 1;
|
||||||
|
|
||||||
|
// where to save specific shard data (ie: player backup)
|
||||||
|
SaveFilesDirectory = "";
|
||||||
|
|
||||||
|
NegFiltersDebug += { "NET", "ADMIN", "MIRROR", "NC", "PATH" };
|
||||||
|
NegFiltersInfo += { "NET", "SERVICE", "ADMIN", "MIRROR", "NC", "CF", "TimerManagerUpdate", "addSearchPath", "Executing command", "GUSNET" };
|
||||||
|
NegFiltersWarning += { "LNETL", "CT_LRC" };
|
||||||
|
|
||||||
|
FontName = "Lucida Console";
|
||||||
|
FontSize = 9;
|
||||||
|
|
||||||
|
// If the update loop is too slow, a thread will produce an assertion.
|
||||||
|
// By default, the value is set to 10 minutes.
|
||||||
|
// Set to 0 for no assertion.
|
||||||
|
UpdateAssertionThreadTimeout = 0;
|
||||||
|
|
||||||
|
DefaultMaxExpectedBlockSize = 200000000; // 200 M !
|
||||||
|
DefaultMaxSentBlockSize = 200000000; // 200 M !
|
||||||
|
|
||||||
|
// how to sleep between to network update
|
||||||
|
// 0 = pipe
|
||||||
|
// 1 = usleep
|
||||||
|
// 2 = nanosleep
|
||||||
|
// 3 = sched_yield
|
||||||
|
// 4 = nothing
|
||||||
|
UseYieldMethod = 0;
|
||||||
|
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
""
|
||||||
|
|
||||||
|
// ,"modulesAdd gushub 44748"
|
||||||
|
// ,"modulesAdd gusnet localhost:44748"
|
||||||
|
|
||||||
|
,"modulesAdd gusnet 213.208.119.219:44748"
|
||||||
|
,"modulesAdd em"
|
||||||
|
// ,"modulesAdd ee enx ais egs ios"
|
||||||
|
};
|
||||||
|
|
||||||
|
Users +=
|
||||||
|
{
|
||||||
|
""
|
||||||
|
|
||||||
|
,"sadge thata boy"
|
||||||
|
,"ravna LeafaithinLlanfrechfa2405"
|
||||||
|
};
|
||||||
|
|
||||||
|
DisplayedVariables +=
|
||||||
|
{
|
||||||
|
""
|
||||||
|
,"EventName"
|
||||||
|
,""
|
||||||
|
,"ActiveShard"
|
||||||
|
,""
|
||||||
|
// ,"@SetEvent|emWinSetEvent"
|
||||||
|
,"@NewEvent|emWinNewEvent"
|
||||||
|
,"@Login|emWinLogin"
|
||||||
|
,"@Upload|emWinUpload"
|
||||||
|
,""
|
||||||
|
,"@View Installed Event|emPeek"
|
||||||
|
,"@Unload Installed Event|emUnload"
|
||||||
|
};
|
@ -0,0 +1,9 @@
|
|||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "general_utilities_service_admin.cfg";
|
||||||
|
|
||||||
|
StartCommands =
|
||||||
|
{
|
||||||
|
""
|
||||||
|
|
||||||
|
,"modulesAdd gushub 44748"
|
||||||
|
};
|
@ -0,0 +1,19 @@
|
|||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "general_utilities_service_common.cfg";
|
||||||
|
|
||||||
|
DontUseNS = 0;
|
||||||
|
DontUseTS = 1;
|
||||||
|
UseMirror= 1;
|
||||||
|
|
||||||
|
NSHost = "localhost";
|
||||||
|
|
||||||
|
GUSMirrorConfig =
|
||||||
|
{
|
||||||
|
"dataset fe_temp",
|
||||||
|
"property NameIndex rn",
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
DisplayedVariables += { "", "SlowestService", "SlowestTock", "", "WaitingForServices", "", "@Pause|pause" };
|
||||||
|
|
||||||
|
NegFiltersDebug += { "LNETL" } ;
|
@ -0,0 +1,9 @@
|
|||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "general_utilities_service_shard.cfg";
|
||||||
|
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
""
|
||||||
|
|
||||||
|
,"modulesAdd ce fr uk"
|
||||||
|
};
|
@ -0,0 +1,9 @@
|
|||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "general_utilities_service_shard.cfg";
|
||||||
|
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
""
|
||||||
|
|
||||||
|
,"modulesAdd ce de uk"
|
||||||
|
};
|
@ -0,0 +1,10 @@
|
|||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "general_utilities_service_shard.cfg";
|
||||||
|
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
""
|
||||||
|
|
||||||
|
,"modulesAdd ce en uk"
|
||||||
|
,"ceChatTexts gus_ce_chat_texts_en.txt"
|
||||||
|
};
|
@ -0,0 +1,9 @@
|
|||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "general_utilities_service_shard.cfg";
|
||||||
|
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
""
|
||||||
|
|
||||||
|
,"modulesAdd ce en us"
|
||||||
|
};
|
@ -0,0 +1,19 @@
|
|||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "general_utilities_service_admin.cfg";
|
||||||
|
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
""
|
||||||
|
|
||||||
|
,"modulesAdd cc uk 2"
|
||||||
|
,"ccLoad"
|
||||||
|
,"ccShow"
|
||||||
|
};
|
||||||
|
|
||||||
|
DisplayedVariables +=
|
||||||
|
{
|
||||||
|
"@Reload|ccLoad"
|
||||||
|
,"@Start|ccRun"
|
||||||
|
,"@Advance|ccAdvance"
|
||||||
|
,"@Stop|ccQuit"
|
||||||
|
};
|
@ -0,0 +1,19 @@
|
|||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "general_utilities_service_admin.cfg";
|
||||||
|
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
""
|
||||||
|
|
||||||
|
,"modulesAdd cc us 10"
|
||||||
|
,"ccLoad"
|
||||||
|
,"ccShow"
|
||||||
|
};
|
||||||
|
|
||||||
|
DisplayedVariables +=
|
||||||
|
{
|
||||||
|
"@Reload|ccLoad"
|
||||||
|
,"@Start|ccRun"
|
||||||
|
,"@Advance|ccAdvance"
|
||||||
|
,"@Stop|ccQuit"
|
||||||
|
};
|
@ -0,0 +1,47 @@
|
|||||||
|
// Use with commandline: gpm_service -C. -L. --nobreak --writepid
|
||||||
|
|
||||||
|
#include "gpm_service_default.cfg"
|
||||||
|
|
||||||
|
// ---- config local variables
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
AESAliasName= "gpms";
|
||||||
|
|
||||||
|
GraphVars += { "TickSpeedLoop", "0" };
|
||||||
|
GraphVars += { "TickSpeedLoop", "60000" };
|
||||||
|
GraphVars += { "L5CallbackCount", "0" };
|
||||||
|
GraphVars += { "L5CallbackCount", "60000" };
|
||||||
|
GraphVars += { "L5CallbackTime", "0" };
|
||||||
|
GraphVars += { "L5CallbackTime", "60000" };
|
||||||
|
GraphVars += { "MirrorCallbackCount", "0" };
|
||||||
|
GraphVars += { "MirrorCallbackCount", "60000" };
|
||||||
|
GraphVars += { "MirrorCallbackTime", "0" };
|
||||||
|
GraphVars += { "MirrorCallbackTime", "60000" };
|
||||||
|
|
||||||
|
Paths += {
|
||||||
|
"../data",
|
||||||
|
"../common",
|
||||||
|
"../common/data_leveldesign",
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by CVariable class)
|
||||||
|
|
||||||
|
// ---- service custom variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
#include "used_continents.cfg"
|
||||||
|
|
||||||
|
// Mirror limits
|
||||||
|
DatasetSizefe_temp = 700000;
|
||||||
|
DatasetSizefame = 26000;
|
||||||
|
|
||||||
|
// ---- service custom variables (used by CVariable class)
|
||||||
|
|
||||||
|
// Set this shard as a ring (1) or mainland (0) shard (main behavior switch)
|
||||||
|
IsRingShard = 0;
|
||||||
|
|
||||||
|
// Disable ryzom verbose logging
|
||||||
|
VerboseMIRROR = 0;
|
||||||
|
|
||||||
|
WorldMapSizeX = 3000;
|
||||||
|
WorldMapSizeY = 3000;
|
@ -0,0 +1,7 @@
|
|||||||
|
#include "common.cfg"
|
||||||
|
|
||||||
|
CheckPlayerSpeed = 0;
|
||||||
|
SecuritySpeedFactor = 1.2;
|
||||||
|
|
||||||
|
LoadPacsPrims = 0;
|
||||||
|
LoadPacsCol = 1;
|
@ -0,0 +1,74 @@
|
|||||||
|
// By default, use WIN displayer
|
||||||
|
WindowStyle = "WIN";
|
||||||
|
|
||||||
|
PathsNoRecurse =
|
||||||
|
{
|
||||||
|
"data_leveldesign/leveldesign/Game_elem", // for sheet_id.bin
|
||||||
|
};
|
||||||
|
|
||||||
|
// set to 0 if you want to use the admin system
|
||||||
|
DontUseAES = 1;
|
||||||
|
DontUseNS = 1;
|
||||||
|
DontUseTS = 1;
|
||||||
|
NSHost="localhost";
|
||||||
|
|
||||||
|
// where to save specific shard data (ie: player backup)
|
||||||
|
SaveFilesDirectory = "";
|
||||||
|
|
||||||
|
NegFiltersDebug += { "NET", "ADMIN", "MIRROR", "NC", "PATH" };
|
||||||
|
NegFiltersInfo += { "NET", "SERVICE", "ADMIN", "MIRROR", "NC", "CF", "TimerManagerUpdate", "addSearchPath" };
|
||||||
|
NegFiltersWarning += { "LNETL", "CT_LRC", "Ignoring map key (__Key__) because __Val__" };
|
||||||
|
|
||||||
|
//FontName = "Lucida Console";
|
||||||
|
FontName = "Courier New";
|
||||||
|
FontSize = 9;
|
||||||
|
|
||||||
|
// If the update loop is too slow, a thread will produce an assertion.
|
||||||
|
// By default, the value is set to 10 minutes.
|
||||||
|
// Set to 0 for no assertion.
|
||||||
|
UpdateAssertionThreadTimeout = 0;
|
||||||
|
|
||||||
|
DefaultMaxExpectedBlockSize = 200000000; // 200 M !
|
||||||
|
DefaultMaxSentBlockSize = 200000000; // 200 M !
|
||||||
|
|
||||||
|
// how to sleep between to network update
|
||||||
|
// 0 = pipe
|
||||||
|
// 1 = usleep
|
||||||
|
// 2 = nanosleep
|
||||||
|
// 3 = sched_yield
|
||||||
|
// 4 = nothing
|
||||||
|
UseYieldMethod = 0;
|
||||||
|
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
"modulesAdd ss",
|
||||||
|
"ssScrLoad general_utilities_service.gss",
|
||||||
|
"ssScrDisplay",
|
||||||
|
"ssScrRoutineRun doTests",
|
||||||
|
};
|
||||||
|
|
||||||
|
Users =
|
||||||
|
{
|
||||||
|
""
|
||||||
|
|
||||||
|
,"sadge thata boy"
|
||||||
|
};
|
||||||
|
|
||||||
|
DisplayedVariables +=
|
||||||
|
{
|
||||||
|
""
|
||||||
|
// ,"@NewEvent|emWinNewEvent"
|
||||||
|
// ,"EventName"
|
||||||
|
// ,""
|
||||||
|
// ,"@Login|emWinLogin"
|
||||||
|
// ,"ActiveShard"
|
||||||
|
// ,""
|
||||||
|
// ,"@Upload|emWinUpload"
|
||||||
|
// ,"@View Installed Event|emWinPeek"
|
||||||
|
// ,"@Start Event|emWinEventStart"
|
||||||
|
// ,""
|
||||||
|
// ,"@Stop Event|emWinEventStop"
|
||||||
|
// ,"@Unload Installed Event|emWinUnload"
|
||||||
|
|
||||||
|
,"ScanJobState"
|
||||||
|
};
|
@ -0,0 +1,79 @@
|
|||||||
|
// Use with commandline: input_output_service -C. -L. --nobreak --writepid
|
||||||
|
|
||||||
|
// ---- config local variables
|
||||||
|
|
||||||
|
#define DONT_USE_LGS_SLAVE
|
||||||
|
|
||||||
|
AESPort="46702";
|
||||||
|
SUPort = 50505;
|
||||||
|
SUGlobalPort = 50503;
|
||||||
|
L3MasterLGSPort = 41292;
|
||||||
|
L3SlaveLGSPort = 49993;
|
||||||
|
SUHost = "localhost";
|
||||||
|
MasterLGSHost = "localhost";
|
||||||
|
SlaveLGSHost = "localhost";
|
||||||
|
// SU - listen address of the SU service (for L5 connections)
|
||||||
|
SUAddress = SUHost+":"+SUPort;
|
||||||
|
|
||||||
|
#include "input_output_service_default.cfg"
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
AESAliasName= "ios";
|
||||||
|
|
||||||
|
// Create a char name mapper
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
"moduleManager.createModule CharNameMapper cnm",
|
||||||
|
"cnm.plug gw",
|
||||||
|
"moduleManager.createModule IOSRingModule iosrm",
|
||||||
|
"iosrm.plug gw",
|
||||||
|
};
|
||||||
|
|
||||||
|
Paths += {
|
||||||
|
"../language/translated",
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by CVariable class)
|
||||||
|
|
||||||
|
// ---- service custom variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
// Mirror limits
|
||||||
|
DatasetSizefe_temp = 700000;
|
||||||
|
DatasetSizefame = 26000;
|
||||||
|
|
||||||
|
// the following variable must be defined but should be empty - it's presence is used to change the behaviour
|
||||||
|
// of the packed sheet reader
|
||||||
|
GeorgePaths = { "" };
|
||||||
|
|
||||||
|
// Use Shard Unifier or not
|
||||||
|
DontUseSU = 0;
|
||||||
|
|
||||||
|
HomeMainlandNames =
|
||||||
|
{
|
||||||
|
"#SHARDID#", "#UC_SHARDNAME#", "#SHARDNAME#",
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---- service custom variables (used by CVariable class)
|
||||||
|
|
||||||
|
// Set this shard as a ring (1) or mainland (0) shard (main behavior switch)
|
||||||
|
IsRingShard = 0;
|
||||||
|
|
||||||
|
// Disable ryzom verbose logging
|
||||||
|
VerboseMIRROR = 0;
|
||||||
|
|
||||||
|
#include "backup_service_interface.cfg"
|
||||||
|
|
||||||
|
// IOS - Directory to store ios.string_cache file
|
||||||
|
StringManagerCacheDirectory = "../cache";
|
||||||
|
|
||||||
|
// IOS - Directory to log chat into
|
||||||
|
LogChatDirectory = "../logs/chat";
|
||||||
|
|
||||||
|
ReadTranslationWork = 0;
|
||||||
|
TranslationWorkPath = "";
|
||||||
|
VerboseStringManager = 0;
|
||||||
|
VerboseStringManagerParser = 0;
|
||||||
|
VerboseChat = 0;
|
||||||
|
VerboseChatManagement = 0;
|
||||||
|
VerboseNameTranslation = 0;
|
@ -0,0 +1,94 @@
|
|||||||
|
#include "common.cfg"
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
// L5 connect to the shard unifier
|
||||||
|
"unifiedNetwork.addService ShardUnifier ( address="+SUAddress+" sendId external autoRetry )",
|
||||||
|
|
||||||
|
// Create a gateway for global interconnection
|
||||||
|
// modules from different shard are visible to each other if they connect to
|
||||||
|
// this gateway. SU Local module have no interest to be plugged here.
|
||||||
|
"moduleManager.createModule StandardGateway glob_gw",
|
||||||
|
// add a layer 3 server transport
|
||||||
|
"glob_gw.transportAdd L3Client l3c",
|
||||||
|
// open the transport
|
||||||
|
"glob_gw.transportCmd l3c(connect addr="+SUHost+":"+SUGlobalPort+")",
|
||||||
|
|
||||||
|
// Create a gateway for logger service connection
|
||||||
|
"moduleManager.createModule StandardGateway lgs_gw",
|
||||||
|
|
||||||
|
// add a layer 3 server transport for master logger service
|
||||||
|
"lgs_gw.transportAdd L3Client masterL3c",
|
||||||
|
// open the transport
|
||||||
|
"lgs_gw.transportCmd masterL3c(connect addr="+MasterLGSHost+":"+L3MasterLGSPort+")",
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifndef DONT_USE_LGS_SLAVE
|
||||||
|
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
// add a layer 3 server transport for slave logger service
|
||||||
|
"lgs_gw.transportAdd L3Client slaveL3c",
|
||||||
|
// open the transport
|
||||||
|
"lgs_gw.transportCmd slaveL3c(connect addr="+SlaveLGSHost+":"+L3SlaveLGSPort+")",
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
// Create a chat unifier client
|
||||||
|
"moduleManager.createModule ChatUnifierClient cuc",
|
||||||
|
|
||||||
|
// and plug it on the gateway to reach the SU ChatUnifierServer
|
||||||
|
"cuc.plug glob_gw",
|
||||||
|
"cuc.plug gw",
|
||||||
|
|
||||||
|
// Create the logger service client module
|
||||||
|
"moduleManager.createModule LoggerServiceClient lsc",
|
||||||
|
"lsc.plug lgs_gw",
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by CVariable class)
|
||||||
|
|
||||||
|
// ---- service custom variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
// a list of system command that can be run with "sysCmd" service command.
|
||||||
|
SystemCmd = {};
|
||||||
|
|
||||||
|
// IOS don't use work directory by default
|
||||||
|
ReadTranslationWork = 0;
|
||||||
|
TranslationWorkPath = "translation/work";
|
||||||
|
|
||||||
|
// Global shard bot name translation file. You sould overide this
|
||||||
|
// in input_output_service.cfg to specialize the file
|
||||||
|
// depending on the shard main language.
|
||||||
|
BotNameTranslationFile = "bot_names.txt";
|
||||||
|
|
||||||
|
// Global shard event faction translation file. You sould override this
|
||||||
|
// in input_output_service.cfg to specialize the file
|
||||||
|
// depending on the shard main language.
|
||||||
|
EventFactionTranslationFile = "event_factions.txt";
|
||||||
|
|
||||||
|
// ---- service custom variables (used by CVariable class)
|
||||||
|
|
||||||
|
// Activate/deactivate debugging of missing paremeter replacement
|
||||||
|
DebugReplacementParameter = 1;
|
||||||
|
|
||||||
|
// Default verbose debug flags:
|
||||||
|
//-----------------------------
|
||||||
|
|
||||||
|
// Log bot name translation from 'BotNameTranslationFile'
|
||||||
|
VerboseNameTranslation = 1;
|
||||||
|
// Log chat management operation
|
||||||
|
VerboseChatManagement = 1;
|
||||||
|
// Log chat event
|
||||||
|
VerboseChat = 1;
|
||||||
|
// Log string manager message
|
||||||
|
VerboseStringManager = 1;
|
||||||
|
// Log the string manager parsing message
|
||||||
|
VerboseStringManagerParser = 0;
|
@ -0,0 +1,18 @@
|
|||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "common.cfg";
|
||||||
|
|
||||||
|
QueryTimeout = 300;
|
||||||
|
LinePerPage = 50;
|
||||||
|
|
||||||
|
WebPort = 49899;
|
||||||
|
|
||||||
|
DontUseNS = 1;
|
||||||
|
|
||||||
|
/* Set this directory so LAS can find log directory for each shard
|
||||||
|
* PLEASE NOTICE THAT THIS LINE SHOULD ONLY BE ADDED TO LOG ANALYSER
|
||||||
|
* Other services that use PDLib should have this set to "".
|
||||||
|
*/
|
||||||
|
StartCommands =
|
||||||
|
{
|
||||||
|
"PDRootDirectory /home/nevrax/save_shard/$shard/pds"
|
||||||
|
};
|
@ -0,0 +1,50 @@
|
|||||||
|
// Use with commandline: logger_service -C. -L. --nobreak --writepid
|
||||||
|
|
||||||
|
#include "logger_service_default.cfg"
|
||||||
|
|
||||||
|
// ---- config local variables
|
||||||
|
|
||||||
|
LGSL3Port = 41292;
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
AESAliasName= "lgs";
|
||||||
|
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
"moduleManager.createModule LoggerService ls",
|
||||||
|
"moduleManager.createModule StandardGateway lgs_gw",
|
||||||
|
"ls.plug lgs_gw",
|
||||||
|
"lgs_gw.transportAdd L3Server l3s",
|
||||||
|
"lgs_gw.transportOptions l3s(PeerInvisible)",
|
||||||
|
"lgs_gw.transportCmd l3s(open port="+ LGSL3Port +")",
|
||||||
|
};
|
||||||
|
|
||||||
|
DontUseNS = 1;
|
||||||
|
|
||||||
|
Paths += {
|
||||||
|
"../data",
|
||||||
|
"../common/data_leveldesign",
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by CVariable class)
|
||||||
|
|
||||||
|
|
||||||
|
SaveFilesDirectory = "..";
|
||||||
|
|
||||||
|
// where to save generic shard data (ie: packed_sheet)
|
||||||
|
WriteFilesDirectory = "../save";
|
||||||
|
|
||||||
|
// ---- service custom variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
// Use Shard Unifier or not
|
||||||
|
DontUseSU = 0;
|
||||||
|
|
||||||
|
HomeMainlandNames =
|
||||||
|
{
|
||||||
|
"#SHARDID#", "#UC_SHARDNAME#", "#SHARDNAME#",
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---- service custom variables (used by CVariable class)
|
||||||
|
|
||||||
|
#include "backup_service_interface.cfg"
|
@ -0,0 +1 @@
|
|||||||
|
#include "common.cfg"
|
@ -0,0 +1,25 @@
|
|||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "common.cfg";
|
||||||
|
|
||||||
|
DisplayedVariables += { "", "@Shards|shards", "@RegUsers|registeredUsers", "@OnlineUsers|onlineUsers", "OnlineUsers|OnlineUsersNumber" };
|
||||||
|
|
||||||
|
WSPort = 49999; // port for the welcome service connection (default is 49999)
|
||||||
|
|
||||||
|
WebPort = 49998; // port for the web server (default 49998)
|
||||||
|
|
||||||
|
AcceptExternalShards = 1; // 1 if you want to accept external shard that are not in database
|
||||||
|
|
||||||
|
Beep = 1; // 1 if you want to beep when a new client comes
|
||||||
|
|
||||||
|
DatabaseHost = "localhost"; // name of the host where the mysql database is (empty string mean localhost)
|
||||||
|
DatabaseName = "nel"; // name of the database where we can find needed info
|
||||||
|
DatabaseLogin = ""; // if we need a login to access the database
|
||||||
|
DatabasePassword = ""; // if we need a password to access the database
|
||||||
|
|
||||||
|
ForceDatabaseReconnection = "dummy"; // change this value to force a configfile reload and reconnection to the database
|
||||||
|
// to take in count the new value of Database*
|
||||||
|
// the content of this variable doesn't matter, it s just a fake to reload database var
|
||||||
|
|
||||||
|
DontUseNS = 1;
|
||||||
|
|
||||||
|
SId = 3;
|
@ -0,0 +1,19 @@
|
|||||||
|
// Use with commandline: mail_forum_service -C. -L. --nobreak --writepid
|
||||||
|
|
||||||
|
#include "mail_forum_service_default.cfg"
|
||||||
|
|
||||||
|
// ---- config local variables
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
AESAliasName= "mfs";
|
||||||
|
|
||||||
|
Paths += {
|
||||||
|
".",
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by CVariable class)
|
||||||
|
|
||||||
|
// ---- service custom variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
// ---- service custom variables (used by CVariable class)
|
@ -0,0 +1,28 @@
|
|||||||
|
#include "common.cfg"
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
DontUseNS = 1;
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by CVariable class)
|
||||||
|
|
||||||
|
// ---- service custom variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
// ---- service custom variables (used by CVariable class)
|
||||||
|
|
||||||
|
WebRootDirectory = "save_shard/www";
|
||||||
|
|
||||||
|
// Set if Hall of Fame generator is enabled
|
||||||
|
HoFEnableGenerator = 1;
|
||||||
|
|
||||||
|
// Set if HoF generator is verbose
|
||||||
|
HoFVerbose = 0;
|
||||||
|
|
||||||
|
// Directory where HDT files are
|
||||||
|
HoFHDTDirectory = "/local/www/hof/hdt";
|
||||||
|
|
||||||
|
// HoF generator maximum update period in milliseconds
|
||||||
|
HoFGeneratorUpdatePeriod = 200;
|
||||||
|
|
||||||
|
// HoF generator directory update period in seconds
|
||||||
|
HoFGeneratorDirUpdatePeriod = 60;
|
@ -0,0 +1,38 @@
|
|||||||
|
// Use with commandline: mirror_service -C. -L. --nobreak --writepid
|
||||||
|
|
||||||
|
#include "mirror_service_default.cfg"
|
||||||
|
|
||||||
|
// ---- config local variables
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
AESAliasName= "ms";
|
||||||
|
|
||||||
|
GraphVars += { "UserSpeedLoop", "0" };
|
||||||
|
GraphVars += { "UserSpeedLoop", "60000" };
|
||||||
|
GraphVars += { "L5CallbackCount", "0" };
|
||||||
|
GraphVars += { "L5CallbackCount", "60000" };
|
||||||
|
GraphVars += { "L5CallbackTime", "0" };
|
||||||
|
GraphVars += { "L5CallbackTime", "60000" };
|
||||||
|
|
||||||
|
Paths += {
|
||||||
|
".",
|
||||||
|
"../common",
|
||||||
|
"../common/data_leveldesign",
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by CVariable class)
|
||||||
|
|
||||||
|
// ---- service custom variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
// Mirror limits
|
||||||
|
DatasetSizefe_temp = 700000;
|
||||||
|
DatasetSizefame = 26000;
|
||||||
|
|
||||||
|
// MS Packet size limit in bytes, PER DATASET (warning: depending on the weights, limits per property may be very small)
|
||||||
|
MaxOutBandwidth = 100000000;
|
||||||
|
|
||||||
|
// ---- service custom variables (used by CVariable class)
|
||||||
|
|
||||||
|
// Disable ryzom verbose logging
|
||||||
|
VerboseMIRROR = 0;
|
@ -0,0 +1,6 @@
|
|||||||
|
#include "common.cfg"
|
||||||
|
|
||||||
|
// ---- service custom variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
// Linux only
|
||||||
|
DestroyGhostSegments = 1;
|
@ -0,0 +1,39 @@
|
|||||||
|
// Use with commandline: monitor_service -C. -L. --nobreak --writepid
|
||||||
|
|
||||||
|
#include "monitor_service_default.cfg"
|
||||||
|
|
||||||
|
// ---- config local variables
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
AESAliasName= "mos";
|
||||||
|
|
||||||
|
GraphVars += { "UserSpeedLoop", "0" };
|
||||||
|
GraphVars += { "UserSpeedLoop", "60000" };
|
||||||
|
GraphVars += { "L5CallbackCount", "0" };
|
||||||
|
GraphVars += { "L5CallbackCount", "60000" };
|
||||||
|
GraphVars += { "L5CallbackTime", "0" };
|
||||||
|
GraphVars += { "L5CallbackTime", "60000" };
|
||||||
|
|
||||||
|
Paths += {
|
||||||
|
"../data",
|
||||||
|
"../common",
|
||||||
|
"../common/data_leveldesign",
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by CVariable class)
|
||||||
|
|
||||||
|
// ---- service custom variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
// Mirror limits
|
||||||
|
DatasetSizefe_temp = 700000;
|
||||||
|
DatasetSizefame = 26000;
|
||||||
|
|
||||||
|
// MS Packet size limit in bytes, PER DATASET (warning: depending on the weights, limits per property may be very small)
|
||||||
|
MaxOutBandwidth = 100000000;
|
||||||
|
|
||||||
|
|
||||||
|
// ---- service custom variables (used by CVariable class)
|
||||||
|
|
||||||
|
// Disable ryzom verbose logging
|
||||||
|
VerboseMIRROR = 0;
|
@ -0,0 +1 @@
|
|||||||
|
#include "common.cfg"
|
@ -0,0 +1,21 @@
|
|||||||
|
// Use with commandline: ryzom_naming_service -C. -L. --nobreak --writepid
|
||||||
|
|
||||||
|
#include "naming_service_default.cfg"
|
||||||
|
|
||||||
|
// ---- config local variables
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
AESAliasName= "rns";
|
||||||
|
|
||||||
|
Paths += {
|
||||||
|
""
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by CVariable class)
|
||||||
|
|
||||||
|
// ---- service custom variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
BasePort = 51000;
|
||||||
|
|
||||||
|
// ---- service custom variables (used by CVariable class)
|
@ -0,0 +1,7 @@
|
|||||||
|
#include "common.cfg"
|
||||||
|
|
||||||
|
SId = 1;
|
||||||
|
DontUseNS = 1;
|
||||||
|
|
||||||
|
UniqueOnShardServices = {}; // { "EGS", "GPMS", "IOS", "TICKS", "WS", "AIS", "DSS" };
|
||||||
|
UniqueByMachineServices = {}; // { "MS" };
|
@ -0,0 +1,4 @@
|
|||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "common.cfg";
|
||||||
|
|
||||||
|
SaveRootPath = "data_shard/pd_save";
|
@ -0,0 +1,39 @@
|
|||||||
|
DontUseNS = 1;
|
||||||
|
DontUseAES = 1;
|
||||||
|
|
||||||
|
WindowStyle = "WIN";
|
||||||
|
FontName = "Lucida Console";
|
||||||
|
FontSize = 8;
|
||||||
|
|
||||||
|
Paths = { "data_leveldesign/leveldesign/DFN", "src_v2/sabrina_test" };
|
||||||
|
WriteFilesDirectory = "src_v2/sabrina_test";
|
||||||
|
SaveFilesDirectory = "src_v2/sabrina_test";
|
||||||
|
|
||||||
|
// factor for damage ( damage *= DamageFactor )
|
||||||
|
DamageFactor = 1.0;
|
||||||
|
// factor to accelerate sentence execution in the brick service (executionTime /= SpeedFactor)
|
||||||
|
SpeedFactor = 1.0;
|
||||||
|
// the length of a cycle (default = 4.0 s)
|
||||||
|
CombatCycleLength = 4.0;
|
||||||
|
|
||||||
|
StartCommands =
|
||||||
|
{
|
||||||
|
"makeSheetId",
|
||||||
|
|
||||||
|
// setup a pair of actors with a targeting b
|
||||||
|
"newPlayer bob",
|
||||||
|
"newPlayer fred",
|
||||||
|
"plrTarget bob fred",
|
||||||
|
|
||||||
|
// basic targeted spell test (with .sphrase phrase)
|
||||||
|
"plrMemSPhrase bob default 0 magic1.sphrase", // memorise spell in mem 0 slot 0
|
||||||
|
"plrUsePhrase bob default 0", // use the phrase in mem 0 slot 0
|
||||||
|
|
||||||
|
// custome phrase test
|
||||||
|
// "plrMemUserPhrase default 1 bla.sbrick bla2.sbrick", // memorise spell in mem 0 slot 1
|
||||||
|
// "plrUsePhrase bob default 1", // use the phrase in mem 0 slot 1
|
||||||
|
|
||||||
|
// display the actors after processing
|
||||||
|
"listActors",
|
||||||
|
"simTick 15",
|
||||||
|
};
|
@ -0,0 +1,2 @@
|
|||||||
|
ScenarioTypes = {"Roleplay", "Combat"};
|
||||||
|
ScenarioLanguages = {"French", "English", "Deutsch"};
|
@ -0,0 +1,49 @@
|
|||||||
|
// Use with commandline: session_browser_server -C. -L. --nobreak --writepid
|
||||||
|
|
||||||
|
#include "session_browser_server_default.cfg"
|
||||||
|
|
||||||
|
// ---- config local variables
|
||||||
|
|
||||||
|
#include "sql.cfg"
|
||||||
|
|
||||||
|
SBSPort = 48851;
|
||||||
|
|
||||||
|
SUHost = "localhost";
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
AESAliasName= "sbs";
|
||||||
|
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
"moduleManager.createModule SessionBrowserServerMod sbs suAddr="+SUHost+":49999 listenPort="+SBSPort+" ring_db(host="+DBHost+" user="+DBRingUser+" password="+DBRingPass+" base="+DBRingName+")",
|
||||||
|
"sbs.plug gw",
|
||||||
|
};
|
||||||
|
|
||||||
|
GraphVars += { "NetSpeedLoop", "0" };
|
||||||
|
GraphVars += { "NetSpeedLoop", "60000" };
|
||||||
|
GraphVars += { "L5CallbackCount", "0" };
|
||||||
|
GraphVars += { "L5CallbackCount", "60000" };
|
||||||
|
GraphVars += { "L5CallbackTime", "0" };
|
||||||
|
GraphVars += { "L5CallbackTime", "60000" };
|
||||||
|
|
||||||
|
Paths += {
|
||||||
|
".",
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by CVariable class)
|
||||||
|
|
||||||
|
// ---- service custom variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
// Use Shard Unifier or not
|
||||||
|
DontUseSU = 0;
|
||||||
|
|
||||||
|
HomeMainlandNames =
|
||||||
|
{
|
||||||
|
"#SHARDID#", "#UC_SHARDNAME#", "#SHARDNAME#",
|
||||||
|
};
|
||||||
|
|
||||||
|
// The max number of ring points (aka ring access) for each ecosystem
|
||||||
|
MaxRingPoints = "A1:D7:F7:J8:L6:R13";
|
||||||
|
|
||||||
|
// ---- service custom variables (used by CVariable class)
|
@ -0,0 +1 @@
|
|||||||
|
#include "common.cfg"
|
@ -0,0 +1,53 @@
|
|||||||
|
// Use with commandline: shard_unifier_service -C. -L. --nobreak --writepid
|
||||||
|
|
||||||
|
// ---- config local variables
|
||||||
|
|
||||||
|
SUGlobalPort = 50503;
|
||||||
|
|
||||||
|
#include "sql.cfg"
|
||||||
|
|
||||||
|
#include "shard_unifier_service_default.cfg"
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
AESAliasName= "su";
|
||||||
|
|
||||||
|
// Create a command executor
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
"moduleManager.createModule CommandExecutor ce",
|
||||||
|
"ce.plug gw",
|
||||||
|
};
|
||||||
|
|
||||||
|
GraphVars += { "TotalConcurentUser", "60000" };
|
||||||
|
GraphVars += { "NetSpeedLoop", "0" };
|
||||||
|
GraphVars += { "NetSpeedLoop", "60000" };
|
||||||
|
GraphVars += { "L5CallbackCount", "0" };
|
||||||
|
GraphVars += { "L5CallbackCount", "60000" };
|
||||||
|
GraphVars += { "L5CallbackTime", "0" };
|
||||||
|
GraphVars += { "L5CallbackTime", "60000" };
|
||||||
|
|
||||||
|
Paths += {
|
||||||
|
".",
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by CVariable class)
|
||||||
|
|
||||||
|
// ---- service custom variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
// Use Shard Unifier or not
|
||||||
|
DontUseSU = 0;
|
||||||
|
|
||||||
|
HomeMainlandNames =
|
||||||
|
{
|
||||||
|
"#SHARDID#", "#UC_SHARDNAME#", "#SHARDNAME#",
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---- service custom variables (used by CVariable class)
|
||||||
|
|
||||||
|
DomainName = "#DOMAINNAME#";
|
||||||
|
|
||||||
|
// The privileges needed to access any ring session
|
||||||
|
PrivilegeForSessionAccess = ":DEV:SGM:GM:SG:";
|
||||||
|
|
||||||
|
#include "backup_service_interface.cfg"
|
@ -0,0 +1,33 @@
|
|||||||
|
#include "common.cfg"
|
||||||
|
|
||||||
|
DontUseNS = 1;
|
||||||
|
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
// Create a gateway for global interconnection
|
||||||
|
// modules from different shard are visible to each other if they connect to
|
||||||
|
// this gateway. SU Local module have no interest to be plugged here.
|
||||||
|
"moduleManager.createModule StandardGateway glob_gw",
|
||||||
|
// add a layer 3 server transport
|
||||||
|
"glob_gw.transportAdd L3Server l3s",
|
||||||
|
// open the transport
|
||||||
|
"glob_gw.transportCmd l3s(open port="+SUGlobalPort+")",
|
||||||
|
// Create a session manager module
|
||||||
|
"moduleManager.createModule RingSessionManager rsm web(port=49999) ring_db(host="+DBHost+" user="+DBRingUser+" password="+DBRingPass+" base="+DBRingName+") nel_db(host="+DBHost+" user="+DBNelUser+" password="+DBNelPass+" base="+DBNelName+")",
|
||||||
|
"rsm.plug gw",
|
||||||
|
// Create a login service module
|
||||||
|
"moduleManager.createModule LoginService ls ring_db(host="+DBHost+" user="+DBRingUser+" password="+DBRingPass+" base="+DBRingName+") web(port=49998) nel_db(host="+DBHost+" user="+DBNelUser+" password="+DBNelPass+" base="+DBNelName+")",
|
||||||
|
"ls.plug gw",
|
||||||
|
// Create a character synchronization module
|
||||||
|
"moduleManager.createModule CharacterSynchronisation cs fake_edit_char ring_db(host="+DBHost+" user="+DBRingUser+" password="+DBRingPass+" base="+DBRingName+")",
|
||||||
|
"cs.plug gw",
|
||||||
|
// Create entity locator module
|
||||||
|
"moduleManager.createModule EntityLocator el ring_db(host="+DBHost+" user="+DBRingUser+" password="+DBRingPass+" base="+DBRingName+") nel_db(host="+DBHost+" user="+DBNelUser+" password="+DBNelPass+" base="+DBNelName+")",
|
||||||
|
"el.plug gw",
|
||||||
|
// Create a mail forum notifier forwarder
|
||||||
|
"moduleManager.createModule MailForumNotifierFwd mfnfwd ring_db(host="+DBHost+" user="+DBRingUser+" password="+DBRingPass+" base="+DBRingName+") web(port=49897)",
|
||||||
|
"mfnfwd.plug gw",
|
||||||
|
// Create a chat unifier server module
|
||||||
|
"moduleManager.createModule ChatUnifierServer cus ring_db(host="+DBHost+" user="+DBRingUser+" password="+DBRingPass+" base="+DBRingName+")",
|
||||||
|
"cus.plug gw",
|
||||||
|
};
|
@ -0,0 +1,7 @@
|
|||||||
|
/////////////////////////////////
|
||||||
|
/////////////////////////////////
|
||||||
|
/// SHEETS PACKER CONFIG FILE ///
|
||||||
|
/////////////////////////////////
|
||||||
|
/////////////////////////////////
|
||||||
|
DataPath = { "patch", "../common/data_leveldesign", "../common/data_common", "data" };
|
||||||
|
LigoPrimitiveClass = "world_editor_classes.xml";
|
@ -0,0 +1,15 @@
|
|||||||
|
//DBHost = "web.ryzom.com";
|
||||||
|
DBHost = "#DBHOST#";
|
||||||
|
DBNelName = "nel";
|
||||||
|
DBRingName = "#DBRING#";
|
||||||
|
// Nel DB user
|
||||||
|
DBNelUser = "#DBUSER#";
|
||||||
|
// Ring DB user
|
||||||
|
DBRingUser = "#DBUSER#";
|
||||||
|
// SU - password to access to the nel database with DBNelUseruser (default is no password)
|
||||||
|
DBNelPass = "#DBPASS#";
|
||||||
|
// SU - password to access to the ring database with DBRingUser (default is no password)
|
||||||
|
DBRingPass = "#DBPASS#";
|
||||||
|
|
||||||
|
// MySQL wrapper strict mode - controls use of asserts if SQL requests fail
|
||||||
|
MSWStrictMode=0;
|
@ -0,0 +1,13 @@
|
|||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "stats_scan_service_default.cfg";
|
||||||
|
|
||||||
|
DontUseAES = 1;
|
||||||
|
DontUseNS = 1;
|
||||||
|
DontUseTS = 1;
|
||||||
|
|
||||||
|
Paths += {};
|
||||||
|
PathsNoRecurse = {"r:/code/ryzom/data_leveldesign/leveldesign/Game_elem"};
|
||||||
|
GeorgePaths = {};
|
||||||
|
WriteFilesDirectory = "";
|
||||||
|
SaveFilesDirectory = "";
|
||||||
|
|
@ -0,0 +1,17 @@
|
|||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "common.cfg";
|
||||||
|
|
||||||
|
DisplayedVariables += { "", "SlowestService", "SlowestTock", "", "WaitingForServices", "", "@Pause|pause" };
|
||||||
|
|
||||||
|
NegFiltersDebug += { "DELTA_", "DEFAULT_CB", "LNETL", };
|
||||||
|
NegFiltersInfo += { "HNETL5" };
|
||||||
|
|
||||||
|
Paths += {};
|
||||||
|
PathsNoRecurse = {};
|
||||||
|
GeorgePaths = {};
|
||||||
|
WriteFilesDirectory = "";
|
||||||
|
SaveFilesDirectory = "";
|
||||||
|
|
||||||
|
StartCommands =
|
||||||
|
{
|
||||||
|
};
|
@ -0,0 +1,27 @@
|
|||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "test_service_default.cfg";
|
||||||
|
|
||||||
|
DontUseAES = 1;
|
||||||
|
DontUseNS = 1;
|
||||||
|
DontUseTS = 1;
|
||||||
|
|
||||||
|
Paths += {};
|
||||||
|
PathsNoRecurse = {};
|
||||||
|
GeorgePaths = {};
|
||||||
|
WriteFilesDirectory = "";
|
||||||
|
SaveFilesDirectory = "";
|
||||||
|
|
||||||
|
StartCommands =
|
||||||
|
{
|
||||||
|
""
|
||||||
|
|
||||||
|
// ,"pdrRead a pdrLines.txt"
|
||||||
|
// ,"pdrWrite a pdrLines_out.xml"
|
||||||
|
|
||||||
|
// ,"pdrRead b pdrLines_out.xml"
|
||||||
|
// ,"pdrWrite b pdrLines_out.txt"
|
||||||
|
|
||||||
|
// ,"pdrRead c pdr_account.xml"
|
||||||
|
// ,"pdrWrite c pdr_account_out.txt"
|
||||||
|
|
||||||
|
};
|
@ -0,0 +1,17 @@
|
|||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "common.cfg";
|
||||||
|
|
||||||
|
DisplayedVariables += { "", "SlowestService", "SlowestTock", "", "WaitingForServices", "", "@Pause|pause" };
|
||||||
|
|
||||||
|
NegFiltersDebug += { "DELTA_", "DEFAULT_CB", "LNETL", };
|
||||||
|
NegFiltersInfo += { "HNETL5" };
|
||||||
|
|
||||||
|
Paths += {};
|
||||||
|
PathsNoRecurse = {};
|
||||||
|
GeorgePaths = {};
|
||||||
|
WriteFilesDirectory = "";
|
||||||
|
SaveFilesDirectory = "";
|
||||||
|
|
||||||
|
StartCommands =
|
||||||
|
{
|
||||||
|
};
|
@ -0,0 +1,16 @@
|
|||||||
|
// List of directory where to find dll
|
||||||
|
TestDllPaths =
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
// List of test dll to load without compilation mode spec (d, df, rd, d) nor extension (.dll or .so)
|
||||||
|
// The dll name is followed by the working directory to set before loading the dll
|
||||||
|
TestDllList =
|
||||||
|
{
|
||||||
|
"../nel/tools/nel_unit_test/misc_ut/misc_unit_test", "../nel/tools/nel_unit_test/misc_ut",
|
||||||
|
"../nel/tools/nel_unit_test/ligo_ut/ligo_unit_test", "../nel/tools/nel_unit_test/ligo_ut",
|
||||||
|
"../nel/tools/nel_unit_test/net_ut/net_unit_test", "../nel/tools/nel_unit_test/net_ut",
|
||||||
|
"game_share_test", ".",
|
||||||
|
"shard_unifier_test", "test_files/shard_unifier_test",
|
||||||
|
"session_browser_test", "test_files/session_browser_test",
|
||||||
|
};
|
@ -0,0 +1,9 @@
|
|||||||
|
// by default, use WIN displayer
|
||||||
|
WindowStyle = "WIN";
|
||||||
|
|
||||||
|
DontUseAES = 1;
|
||||||
|
DontUseNS = 1;
|
||||||
|
NSHost = "";
|
||||||
|
|
||||||
|
|
||||||
|
NegFiltersDebug = { "LNETL1" };
|
@ -0,0 +1,12 @@
|
|||||||
|
// link the common configuration file
|
||||||
|
RootConfigFilename = "common.cfg";
|
||||||
|
|
||||||
|
//DisplayedVariables += {"GlobalActorCount","GlobalActorMoves","GlobalActorUpdates"};
|
||||||
|
|
||||||
|
// by default, use localhost to find the naming service
|
||||||
|
//NSHost = "nevrax-01";
|
||||||
|
|
||||||
|
|
||||||
|
//StartCommands = {
|
||||||
|
// "execute_test test.combat.test"
|
||||||
|
//};
|
@ -0,0 +1,30 @@
|
|||||||
|
// Use with commandline: tick_service -C. -L. --nobreak --writepid
|
||||||
|
|
||||||
|
#include "tick_service_default.cfg"
|
||||||
|
|
||||||
|
// ---- config local variables
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
AESAliasName= "ts";
|
||||||
|
|
||||||
|
Paths += {
|
||||||
|
"../data",
|
||||||
|
"../common/data_leveldesign",
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by CVariable class)
|
||||||
|
|
||||||
|
// ---- service custom variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
// Mirror limits
|
||||||
|
DatasetSizefe_temp = 700000;
|
||||||
|
DatasetSizefame = 26000;
|
||||||
|
|
||||||
|
|
||||||
|
// ---- service custom variables (used by CVariable class)
|
||||||
|
|
||||||
|
// Disable ryzom verbose logging
|
||||||
|
VerboseMIRROR = 0;
|
||||||
|
|
||||||
|
#include "backup_service_interface.cfg"
|
@ -0,0 +1,8 @@
|
|||||||
|
#include "common.cfg"
|
||||||
|
|
||||||
|
/// A list of vars to graph for TS
|
||||||
|
GraphVars +=
|
||||||
|
{
|
||||||
|
"TotalSpeedLoop", "60000", // low rez, every minutes
|
||||||
|
"TotalSpeedLoop", "0", // high rez, every tick
|
||||||
|
};
|
@ -0,0 +1,40 @@
|
|||||||
|
// This is the mapping for logical continent to physical one (server_share/used_continent.cpp)
|
||||||
|
ContinentNameTranslator =
|
||||||
|
{
|
||||||
|
"matis_newbie", "matis",
|
||||||
|
"zorai_newbie", "zorai",
|
||||||
|
"terre", "terre_oubliee",
|
||||||
|
"sources", "sources_interdites"
|
||||||
|
};
|
||||||
|
|
||||||
|
// This is the list of continent to use with their unique instance number (server_share/used_continent.cpp)
|
||||||
|
UsedContinents =
|
||||||
|
{
|
||||||
|
"bagne", "0",
|
||||||
|
"fyros", "1",
|
||||||
|
"fyros_island", "2",
|
||||||
|
"fyros_newbie", "3",
|
||||||
|
"indoors", "4",
|
||||||
|
"matis", "5",
|
||||||
|
"matis_newbie", "7",
|
||||||
|
"matis_island", "8",
|
||||||
|
"nexus", "9",
|
||||||
|
"route_gouffre","10",
|
||||||
|
"sources", "11",
|
||||||
|
"terre", "12",
|
||||||
|
// "testroom", "13",
|
||||||
|
"tryker", "14",
|
||||||
|
"tryker_island","15",
|
||||||
|
"tryker_newbie","16",
|
||||||
|
"zorai", "17",
|
||||||
|
"zorai_island", "18",
|
||||||
|
"zorai_newbie", "19",
|
||||||
|
"newbieland", "20",
|
||||||
|
"kitiniere", "21",
|
||||||
|
"r2_desert", "22",
|
||||||
|
"r2_forest", "23",
|
||||||
|
"r2_lakes", "24",
|
||||||
|
"r2_jungle", "25",
|
||||||
|
"r2_roots", "26"
|
||||||
|
//ace kitiniere+tcm "corrupted_moor", "22"
|
||||||
|
};
|
@ -0,0 +1,34 @@
|
|||||||
|
// Use with commandline: ryzom_welcome_service -C. -L. --nobreak --writepid
|
||||||
|
|
||||||
|
// ---- config local variables
|
||||||
|
|
||||||
|
SUPort = 50505;
|
||||||
|
SUHost = "localhost";
|
||||||
|
// SU - listen address of the SU service (for L5 connections)
|
||||||
|
SUAddress = SUHost+":"+SUPort;
|
||||||
|
|
||||||
|
#include "welcome_service_default.cfg"
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
AESAliasName= "rws";
|
||||||
|
|
||||||
|
Paths += {
|
||||||
|
"../data",
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---- service NeL variables (used by CVariable class)
|
||||||
|
|
||||||
|
// ---- service custom variables (used by ConfigFile class)
|
||||||
|
|
||||||
|
// WS - use or not the legacy WelcomeService from nel ns (only for backward compatibility during transition to ring)
|
||||||
|
DontUseLSService = 1;
|
||||||
|
|
||||||
|
LSHost = SUHost;
|
||||||
|
|
||||||
|
// Set a mainland SessionId.
|
||||||
|
// Live: Must be 0 for ring shards, non-zero (usually ShardId) for mainland shards
|
||||||
|
// Dev: Can be non-zero to initially connect a client to a ring shard
|
||||||
|
FixedSessionId = ShardId;
|
||||||
|
|
||||||
|
// ---- service custom variables (used by CVariable class)
|
@ -0,0 +1,38 @@
|
|||||||
|
#include "common.cfg"
|
||||||
|
|
||||||
|
// short name of the frontend service
|
||||||
|
FrontendServiceName = "FS";
|
||||||
|
|
||||||
|
// in ring architecture, we no more use the legacy LS
|
||||||
|
DontUseLS = 1;
|
||||||
|
|
||||||
|
// if any of this services is not connected, the WS is closed.
|
||||||
|
ExpectedServices = { "FS", "MS", "EGS", "GPMS", "IOS", "TICKS" };
|
||||||
|
|
||||||
|
// Access level to shard
|
||||||
|
// 0: only dev
|
||||||
|
// 1: dev + privileged users (see also OpenGroups variable)
|
||||||
|
// 2: open for all
|
||||||
|
ShardOpen = 2;
|
||||||
|
|
||||||
|
// File that contains the ShardOpen value (used to override ShardOpen value through AES' command createFile)
|
||||||
|
// For instance, ShardOpen default value is 0, then AES creates a file to set ShardOpen to 2. If WS crashes,
|
||||||
|
// ShardOpen is still set to 2 when it relaunches...
|
||||||
|
// ShardOpenStateFile = "/tmp/shard_open_state";
|
||||||
|
|
||||||
|
// Privileged Groups
|
||||||
|
OpenGroups = ":GM:SGM:G:SG:GUEST:";
|
||||||
|
|
||||||
|
UsePatchMode = 0;
|
||||||
|
|
||||||
|
// create welcome service module
|
||||||
|
StartCommands +=
|
||||||
|
{
|
||||||
|
// create the service
|
||||||
|
"moduleManager.createModule WelcomeService ws",
|
||||||
|
// plug it in the gateway
|
||||||
|
"ws.plug gw",
|
||||||
|
|
||||||
|
// add the SU service
|
||||||
|
"unifiedNetwork.addService ShardUnifier ( address="+SUAddress+" sendId external autoRetry )",
|
||||||
|
};
|
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# ______ _____ _ _ _____ _
|
||||||
|
# | ___ \ / ___| | | | |_ _| | |
|
||||||
|
# | |_/ / _ _______ _ __ ___ \ `--.| |__ __ _ _ __ __| | | | ___ ___ | |___
|
||||||
|
# | / | | |_ / _ \| '_ ` _ \ `--. \ '_ \ / _` | '__/ _` | | |/ _ \ / _ \| / __|
|
||||||
|
# | |\ \ |_| |/ / (_) | | | | | | /\__/ / | | | (_| | | | (_| | | | (_) | (_) | \__ \
|
||||||
|
# \_| \_\__, /___\___/|_| |_| |_| \____/|_| |_|\__,_|_| \__,_| \_/\___/ \___/|_|___/
|
||||||
|
# __/ |
|
||||||
|
# |___/
|
||||||
|
#
|
||||||
|
# Ryzom - MMORPG Framework <https://ryzom.com/dev/>
|
||||||
|
# Copyright (C) 2019 Winch Gate Property Limited
|
||||||
|
# This program is free software: read https://ryzom.com/dev/copying.html for more details
|
||||||
|
#
|
||||||
|
# Config file for ryzom shard tools
|
||||||
|
#
|
||||||
|
|
||||||
|
# Automatic restart of services
|
||||||
|
AUTO_RESTART=1
|
||||||
|
|
||||||
|
# Web url use to notify and manage apps who need know when a service is started
|
||||||
|
NOTIFY_URL_SERVICE_RESTARTED="https://app.ryzom.com/app_arcc/services_started.php"
|
||||||
|
NOTIFY_URL_KEY="C6tLpddu8NJjvhyzBLqjw4uQWRXbGRsQ"
|
||||||
|
|
||||||
|
# Use gdb
|
||||||
|
USE_GDB=1
|
||||||
|
|
||||||
|
# Notification command
|
||||||
|
NOTIFY_COMMAND=""
|
@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# ______ _____ _ _ _____ _
|
||||||
|
# | ___ \ / ___| | | | |_ _| | |
|
||||||
|
# | |_/ / _ _______ _ __ ___ \ `--.| |__ __ _ _ __ __| | | | ___ ___ | |___
|
||||||
|
# | / | | |_ / _ \| '_ ` _ \ `--. \ '_ \ / _` | '__/ _` | | |/ _ \ / _ \| / __|
|
||||||
|
# | |\ \ |_| |/ / (_) | | | | | | /\__/ / | | | (_| | | | (_| | | | (_) | (_) | \__ \
|
||||||
|
# \_| \_\__, /___\___/|_| |_| |_| \____/|_| |_|\__,_|_| \__,_| \_/\___/ \___/|_|___/
|
||||||
|
# __/ |
|
||||||
|
# |___/
|
||||||
|
#
|
||||||
|
# Ryzom - MMORPG Framework <https://ryzom.com/dev/>
|
||||||
|
# Copyright (C) 2019 Winch Gate Property Limited
|
||||||
|
# This program is free software: read https://ryzom.com/dev/copying.html for more details
|
||||||
|
#
|
||||||
|
# This script will notify external services like RocketChat or Web Apps
|
||||||
|
#
|
||||||
|
|
||||||
|
COMMAND=$1
|
||||||
|
shift
|
||||||
|
|
||||||
|
CWD=$(dirname "$0")
|
||||||
|
. "$CWD/config.sh"
|
||||||
|
|
||||||
|
if [[ "$COMMAND" = "ServiceStarted" ]]
|
||||||
|
then
|
||||||
|
if [[ -z "$NOTIFY_URL_SERVICE_RESTARTED" ]]
|
||||||
|
then
|
||||||
|
curl "$NOTIFY_URL_SERVICE_RESTARTED?command=started&shard=$(hostname -s)&apikey=$NOTIFY_URL_KEY&service=$2"
|
||||||
|
fi
|
||||||
|
|
||||||
|
elif [[ "$COMMAND" = "ServiceStoped" ]]
|
||||||
|
then
|
||||||
|
curl "$NOTIFY_URL_SERVICE_RESTARTED?command=stoped&shard=$(hostname -s)&apikey=$NOTIFY_URL_KEY&service=$2"
|
||||||
|
fi
|
||||||
|
|
@ -0,0 +1,119 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# ______ _____ _ _ _____ _
|
||||||
|
# | ___ \ / ___| | | | |_ _| | |
|
||||||
|
# | |_/ / _ _______ _ __ ___ \ `--.| |__ __ _ _ __ __| | | | ___ ___ | |___
|
||||||
|
# | / | | |_ / _ \| '_ ` _ \ `--. \ '_ \ / _` | '__/ _` | | |/ _ \ / _ \| / __|
|
||||||
|
# | |\ \ |_| |/ / (_) | | | | | | /\__/ / | | | (_| | | | (_| | | | (_) | (_) | \__ \
|
||||||
|
# \_| \_\__, /___\___/|_| |_| |_| \____/|_| |_|\__,_|_| \__,_| \_/\___/ \___/|_|___/
|
||||||
|
# __/ |
|
||||||
|
# |___/
|
||||||
|
#
|
||||||
|
# Ryzom - MMORPG Framework <https://ryzom.com/dev/>
|
||||||
|
# Copyright (C) 2019 Winch Gate Property Limited
|
||||||
|
# This program is free software: read https://ryzom.com/dev/copying.html for more details
|
||||||
|
#
|
||||||
|
# This script is a service launcher that works with a command file
|
||||||
|
# to determine when to launch the application that it is responsible for
|
||||||
|
#
|
||||||
|
|
||||||
|
CWD=$(dirname "$0")
|
||||||
|
. "$CWD/config.sh"
|
||||||
|
|
||||||
|
NAME="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
|
EXECUTABLE=$1
|
||||||
|
shift
|
||||||
|
|
||||||
|
CTRL_CMDLINE=$*
|
||||||
|
|
||||||
|
|
||||||
|
mkdir -p $NAME
|
||||||
|
|
||||||
|
DOMAIN=shard
|
||||||
|
NAME_BASE="$NAME/$NAME"
|
||||||
|
CTRL_FILE=${NAME_BASE}_immediate.launch_ctrl
|
||||||
|
NEXT_CTRL_FILE=${NAME_BASE}_waiting.launch_ctrl
|
||||||
|
STATE_FILE=${NAME_BASE}.state
|
||||||
|
START_COUNTER_FILE=${NAME_BASE}.start_count
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo ---------------------------------------------------------------------------------
|
||||||
|
echo Starting service launcher
|
||||||
|
echo ---------------------------------------------------------------------------------
|
||||||
|
printf "%-16s = " CMDLINE ; echo $CTRL_CMDLINE
|
||||||
|
printf "%-16s = " CTRL_FILE ; echo $CTRL_FILE
|
||||||
|
printf "%-16s = " NEXT_CTRL_FILE ; echo $NEXT_CTRL_FILE
|
||||||
|
printf "%-16s = " STATE_FILE ; echo $STATE_FILE
|
||||||
|
echo ---------------------------------------------------------------------------------
|
||||||
|
echo
|
||||||
|
|
||||||
|
# reinit the start counter
|
||||||
|
echo 0 > $START_COUNTER_FILE
|
||||||
|
START_COUNTER=0
|
||||||
|
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
# see if the conditions are right to launch the app
|
||||||
|
if [ -e $CTRL_FILE ]
|
||||||
|
then
|
||||||
|
|
||||||
|
# a control file exists so read it's contents
|
||||||
|
CTRL_COMMAND=_$(cat $CTRL_FILE)_
|
||||||
|
|
||||||
|
# do we have a 'launch' command?
|
||||||
|
if [ $CTRL_COMMAND = _LAUNCH_ ]
|
||||||
|
then
|
||||||
|
|
||||||
|
# update the start counter
|
||||||
|
START_COUNTER=$(( $START_COUNTER + 1 ))
|
||||||
|
echo $START_COUNTER > $START_COUNTER_FILE
|
||||||
|
|
||||||
|
# we have a launch command so prepare, launch, wait for exit and do the housekeeping
|
||||||
|
echo -----------------------------------------------------------------------
|
||||||
|
echo Launching ...
|
||||||
|
echo
|
||||||
|
printf RUNNING > $STATE_FILE
|
||||||
|
|
||||||
|
#notify start
|
||||||
|
"$CWD/notify.sh" ServiceStarted $NAME
|
||||||
|
|
||||||
|
if [[ "$USE_GDB" == "1" ]]
|
||||||
|
then
|
||||||
|
if [ "$NAME" = "egs" ] || [ "$NAME" = "ios" ] || [ "$NAME" = "ais_fyros" ] || [ "$NAME" = "ais_matis" ] || [ "$NAME" = "ais_tryker" ] || [ "$NAME" = "ais_roots" ] || [ "$NAME" = "ais_zorai" ] || [ "$NAME" = "ais_ark" ] || [ "$NAME" = "ais_gpms" ]
|
||||||
|
then
|
||||||
|
gdb -batch -ex "set logging file $NAME/gdb_dump.txt" -ex "set logging on" -ex "run $CTRL_CMDLINE" -ex "bt" $EXECUTABLE
|
||||||
|
fi
|
||||||
|
$EXECUTABLE $CTRL_CMDLINE
|
||||||
|
else
|
||||||
|
$EXECUTABLE $CTRL_CMDLINE
|
||||||
|
fi
|
||||||
|
|
||||||
|
#notify stop
|
||||||
|
"$CWD/notify.sh" ServiceStopped $NAME
|
||||||
|
|
||||||
|
echo -----------------------------------------------------------------------
|
||||||
|
printf STOPPED > $STATE_FILE
|
||||||
|
|
||||||
|
# consume (remove) the control file to allow start once
|
||||||
|
rm $CTRL_FILE
|
||||||
|
|
||||||
|
if [[ "$AUTO_RESTART" == "0" ]]
|
||||||
|
then
|
||||||
|
echo "Press ENTER to relaunch"
|
||||||
|
read
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# either we haven't launched the app yet or we have launched and it has exitted
|
||||||
|
if [ -e $NEXT_CTRL_FILE ]
|
||||||
|
then
|
||||||
|
# we have some kind of relaunch directive lined up so deal with it
|
||||||
|
mv $NEXT_CTRL_FILE $CTRL_FILE
|
||||||
|
else
|
||||||
|
# automatic launch
|
||||||
|
printf LAUNCH > $CTRL_FILE
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
@ -0,0 +1,68 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# ______ _____ _ _ _____ _
|
||||||
|
# | ___ \ / ___| | | | |_ _| | |
|
||||||
|
# | |_/ / _ _______ _ __ ___ \ `--.| |__ __ _ _ __ __| | | | ___ ___ | |___
|
||||||
|
# | / | | |_ / _ \| '_ ` _ \ `--. \ '_ \ / _` | '__/ _` | | |/ _ \ / _ \| / __|
|
||||||
|
# | |\ \ |_| |/ / (_) | | | | | | /\__/ / | | | (_| | | | (_| | | | (_) | (_) | \__ \
|
||||||
|
# \_| \_\__, /___\___/|_| |_| |_| \____/|_| |_|\__,_|_| \__,_| \_/\___/ \___/|_|___/
|
||||||
|
# __/ |
|
||||||
|
# |___/
|
||||||
|
#
|
||||||
|
# Ryzom - MMORPG Framework <https://ryzom.com/dev/>
|
||||||
|
# Copyright (C) 2019 Winch Gate Property Limited
|
||||||
|
# This program is free software: read https://ryzom.com/dev/copying.html for more details
|
||||||
|
#
|
||||||
|
# Script to build Rocketchat with ryzombridge
|
||||||
|
#
|
||||||
|
|
||||||
|
VERSION="1.0.0-rc.0"
|
||||||
|
BUILD_PATH=~/builds
|
||||||
|
|
||||||
|
echo "INSTALLATION OF VERSION $VERSION !!!!"
|
||||||
|
|
||||||
|
echo "If you don't have install all requirements check at:"
|
||||||
|
echo "https://rocket.chat/docs/installation/manual-installation/ubuntu/"
|
||||||
|
echo "To install meteor : curl https://install.meteor.com/ | sh"
|
||||||
|
echo "Ctrl+c to abort..."
|
||||||
|
read
|
||||||
|
|
||||||
|
echo "Erasing old..."
|
||||||
|
rm -rf $BUILD_PATH/RocketChat/Rocket.Chat.old
|
||||||
|
|
||||||
|
mv Rocket.Chat Rocket.Chat.old
|
||||||
|
|
||||||
|
cd ~/builds/RocketChat/
|
||||||
|
if [[ ! -d "megacorp" ]]
|
||||||
|
echo "Missing megacorp. Cloning it.."
|
||||||
|
hg clone ssh://hg@bitbucket.org/ryzom/megacorp
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd megacorp
|
||||||
|
hg pull
|
||||||
|
hg update -v
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
git clone https://github.com/RocketChat/Rocket.Chat.git
|
||||||
|
|
||||||
|
cd Rocket.Chat
|
||||||
|
git checkout $VERSION
|
||||||
|
|
||||||
|
cp $BUILD_PATH/RocketChat/megacorp/ryzom-rocket-bridge/ packages/
|
||||||
|
echo -e "\nryzom-rocket-bridge" >> .meteor/packages
|
||||||
|
|
||||||
|
npm install --production
|
||||||
|
|
||||||
|
rm -rf ../rc-bundle
|
||||||
|
meteor build ../rc-bundle --architecture os.linux.x86_64
|
||||||
|
meteor build ../rc-bundle --architecture os.linux.x86_64
|
||||||
|
|
||||||
|
cd ../rc-bundle
|
||||||
|
tar xvfz Rocket.Chat.tar.gz
|
||||||
|
|
||||||
|
cd ~
|
||||||
|
mv Rocket.Chat/ Rocket.Chat.old
|
||||||
|
cp -r src/rc-bundle/bundle/ Rocket.Chat/
|
||||||
|
|
||||||
|
cd ~/Rocket.Chat/programs/server
|
||||||
|
npm install
|
||||||
|
|
@ -0,0 +1,120 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# ______ _____ _ _ _____ _
|
||||||
|
# | ___ \ / ___| | | | |_ _| | |
|
||||||
|
# | |_/ / _ _______ _ __ ___ \ `--.| |__ __ _ _ __ __| | | | ___ ___ | |___
|
||||||
|
# | / | | |_ / _ \| '_ ` _ \ `--. \ '_ \ / _` | '__/ _` | | |/ _ \ / _ \| / __|
|
||||||
|
# | |\ \ |_| |/ / (_) | | | | | | /\__/ / | | | (_| | | | (_| | | | (_) | (_) | \__ \
|
||||||
|
# \_| \_\__, /___\___/|_| |_| |_| \____/|_| |_|\__,_|_| \__,_| \_/\___/ \___/|_|___/
|
||||||
|
# __/ |
|
||||||
|
# |___/
|
||||||
|
#
|
||||||
|
# Ryzom - MMORPG Framework <https://ryzom.com/dev/>
|
||||||
|
# Copyright (C) 2019 Winch Gate Property Limited
|
||||||
|
# This program is free software: read https://ryzom.com/dev/copying.html for more details
|
||||||
|
#
|
||||||
|
# This script helps to manage the shard using a screen session.
|
||||||
|
# You can start, join, stop and get state of services
|
||||||
|
#
|
||||||
|
|
||||||
|
CMD=$1
|
||||||
|
DOMAIN=shard
|
||||||
|
|
||||||
|
if [[ ! -z "$2" ]]
|
||||||
|
then
|
||||||
|
SHARD_PATH=$2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "$CMD" ]]
|
||||||
|
then
|
||||||
|
echo
|
||||||
|
echo Screen sessions currently running:
|
||||||
|
screen -list
|
||||||
|
echo
|
||||||
|
echo "Commands:"
|
||||||
|
echo " 'start' to start the ${DOMAIN}"
|
||||||
|
echo " 'stop' to stop the ${DOMAIN}"
|
||||||
|
echo " 'join' to join the ${DOMAIN}'s screen session"
|
||||||
|
echo " 'share' to join the ${DOMAIN} in shared mode"
|
||||||
|
echo " 'state' to view state information for the ${DOMAIN}"
|
||||||
|
echo
|
||||||
|
printf "Enter a command: "
|
||||||
|
read CMD
|
||||||
|
fi
|
||||||
|
|
||||||
|
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
|
||||||
|
else
|
||||||
|
screen -d -r $(screen -list | grep \\\.${DOMAIN}| sed 's/(.*)//') -X quit > /dev/null
|
||||||
|
if [ -f $SHARD_PATH/run/aes_state.txt ]
|
||||||
|
then
|
||||||
|
rm -r $SHARD_PATH/run/*
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
STARTARGS=
|
||||||
|
if [ "$CMD" = "batchstart" ]
|
||||||
|
then
|
||||||
|
STARTARGS="-d -m"
|
||||||
|
CMD="start"
|
||||||
|
fi
|
||||||
|
|
||||||
|
LIGHT=
|
||||||
|
if [ "$CMD" = "light" ]
|
||||||
|
then
|
||||||
|
LIGHT=".light"
|
||||||
|
CMD="start"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$CMD" = "start" ]
|
||||||
|
then
|
||||||
|
|
||||||
|
cd $SHARD_PATH/run
|
||||||
|
|
||||||
|
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
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SHARD_PATH/lib
|
||||||
|
export SHARD_PATH=$SHARD_PATH
|
||||||
|
screen $STARTARGS -S ${DOMAIN} -c $SHARD_PATH/tools/${DOMAIN}.screen${LIGHT}.rc
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
JOINARGS=
|
||||||
|
if [ "$CMD" = "share" ]
|
||||||
|
then
|
||||||
|
JOINARGS="-x"
|
||||||
|
CMD="join"
|
||||||
|
fi
|
||||||
|
|
||||||
|
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
|
||||||
|
else
|
||||||
|
screen -r ${JOINARGS} $(screen -list | grep \\\.${DOMAIN}| sed 's/(.*)//')
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$CMD" = "state" ]
|
||||||
|
then
|
||||||
|
cd $SHARD_PATH/run
|
||||||
|
echo State of domain ${DOMAIN}:
|
||||||
|
if [ $(echo */*.state) = "*/*.state" ]
|
||||||
|
then
|
||||||
|
echo - No state files found
|
||||||
|
else
|
||||||
|
grep RUNNING */*state
|
||||||
|
fi
|
||||||
|
fi
|
@ -0,0 +1,95 @@
|
|||||||
|
#
|
||||||
|
# ______ _____ _ _ _____ _
|
||||||
|
# | ___ \ / ___| | | | |_ _| | |
|
||||||
|
# | |_/ / _ _______ _ __ ___ \ `--.| |__ __ _ _ __ __| | | | ___ ___ | |___
|
||||||
|
# | / | | |_ / _ \| '_ ` _ \ `--. \ '_ \ / _` | '__/ _` | | |/ _ \ / _ \| / __|
|
||||||
|
# | |\ \ |_| |/ / (_) | | | | | | /\__/ / | | | (_| | | | (_| | | | (_) | (_) | \__ \
|
||||||
|
# \_| \_\__, /___\___/|_| |_| |_| \____/|_| |_|\__,_|_| \__,_| \_/\___/ \___/|_|___/
|
||||||
|
# __/ |
|
||||||
|
# |___/
|
||||||
|
#
|
||||||
|
# Ryzom - MMORPG Framework <https://ryzom.com/dev/>
|
||||||
|
# Copyright (C) 2019 Winch Gate Property Limited
|
||||||
|
# This program is free software: read https://ryzom.com/dev/copying.html for more details
|
||||||
|
#
|
||||||
|
# This rc script is used to start all services of the shard into a screen session
|
||||||
|
# This is the light version (only one ai service) !
|
||||||
|
#
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# SCREEN KEYBINDINGS
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Remove some stupid / dangerous key bindings
|
||||||
|
bind ^k
|
||||||
|
#bind L
|
||||||
|
bind ^\
|
||||||
|
# Make them better
|
||||||
|
bind \\ quit
|
||||||
|
bind K kill
|
||||||
|
bind I login on
|
||||||
|
bind O login off
|
||||||
|
|
||||||
|
if [ "x$1" != "x" ]
|
||||||
|
then
|
||||||
|
SHARD_PATH=$1
|
||||||
|
fi
|
||||||
|
|
||||||
|
chdir $SHARD_PATH/run
|
||||||
|
|
||||||
|
echo "Started at $(date) in $SHARD_PATH" > /tmp/started.run
|
||||||
|
|
||||||
|
screen -t aes /bin/bash $SHARD_PATH/tools/service_launcher.sh aes ../sbin/ryzom_admin_service -A. -C../cfgs -L../logs --nobreak --fulladminname=admin_executor_service --shortadminname=AES
|
||||||
|
|
||||||
|
# bms_master
|
||||||
|
screen -t bms_master /bin/bash $SHARD_PATH/tools/service_launcher.sh bms_master ../sbin/ryzom_backup_service -C../cfgs -L../logs --nobreak --writepid -P49990
|
||||||
|
|
||||||
|
# bms_pd_master
|
||||||
|
#screen -t bms_pd_master /bin/bash $SHARD_PATH/tools/service_launcher.sh bms_pd_master ../sbin/ryzom_backup_service -C../cfgs -L../logs --nobreak --writepid -P49992
|
||||||
|
|
||||||
|
# egs
|
||||||
|
screen -t egs /bin/bash $SHARD_PATH/tools/service_launcher.sh egs ../sbin/ryzom_entities_game_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# gpms
|
||||||
|
screen -t gpms /bin/bash $SHARD_PATH/tools/service_launcher.sh gpms ../sbin/ryzom_gpm_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# ios
|
||||||
|
screen -t ios /bin/bash $SHARD_PATH/tools/service_launcher.sh ios ../sbin/ryzom_ios_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# rns
|
||||||
|
screen -t rns /bin/bash $SHARD_PATH/tools/service_launcher.sh rns ../sbin/ryzom_naming_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# rws
|
||||||
|
screen -t rws /bin/bash $SHARD_PATH/tools/service_launcher.sh rws ../sbin/ryzom_welcome_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# ts
|
||||||
|
screen -t ts /bin/bash $SHARD_PATH/tools/service_launcher.sh ts ../sbin/ryzom_tick_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# ms
|
||||||
|
screen -t ms /bin/bash $SHARD_PATH/tools/service_launcher.sh ms ../sbin/ryzom_mirror_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
#ais_ark
|
||||||
|
screen -t ais_ark /bin/bash $SHARD_PATH/tools/service_launcher.sh ais_ark ../sbin/ryzom_ai_service -C../cfgs -L../logs -Nais_ark --nobreak --writepid -mCommon:Indoors::R2Desert:R2Roots:R2Jungle:R2Forest:R2Lakes:Post
|
||||||
|
|
||||||
|
# mfs
|
||||||
|
screen -t mfs /bin/bash $SHARD_PATH/tools/service_launcher.sh mfs ../sbin/ryzom_mail_forum_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# su
|
||||||
|
screen -t su /bin/bash $SHARD_PATH/tools/service_launcher.sh su ../sbin/ryzom_shard_unifier_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
# fes
|
||||||
|
screen -t fes /bin/bash $SHARD_PATH/tools/service_launcher.sh fes ../sbin/ryzom_frontend_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# sbs
|
||||||
|
screen -t sbs /bin/bash $SHARD_PATH/tools/service_launcher.sh sbs ../sbin/ryzom_session_browser_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# lgs
|
||||||
|
screen -t lgs /bin/bash $SHARD_PATH/tools/service_launcher.sh lgs ../sbin/ryzom_logger_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# mos
|
||||||
|
screen -t mos /bin/bash $SHARD_PATH/tools/service_launcher.sh mos ../sbin/ryzom_monitor_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# pdss
|
||||||
|
#screen -t pdss /bin/bash $SHARD_PATH/tools/service_launcher.sh pdss ../sbin/ryzom_pd_support_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# ras
|
||||||
|
screen -t ras /bin/bash $SHARD_PATH/tools/service_launcher.sh ras ../sbin/ryzom_admin_service --fulladminname=admin_service --shortadminname=AS -C../cfgs -L../logs --nobreak --writepid
|
@ -0,0 +1,119 @@
|
|||||||
|
#
|
||||||
|
# ______ _____ _ _ _____ _
|
||||||
|
# | ___ \ / ___| | | | |_ _| | |
|
||||||
|
# | |_/ / _ _______ _ __ ___ \ `--.| |__ __ _ _ __ __| | | | ___ ___ | |___
|
||||||
|
# | / | | |_ / _ \| '_ ` _ \ `--. \ '_ \ / _` | '__/ _` | | |/ _ \ / _ \| / __|
|
||||||
|
# | |\ \ |_| |/ / (_) | | | | | | /\__/ / | | | (_| | | | (_| | | | (_) | (_) | \__ \
|
||||||
|
# \_| \_\__, /___\___/|_| |_| |_| \____/|_| |_|\__,_|_| \__,_| \_/\___/ \___/|_|___/
|
||||||
|
# __/ |
|
||||||
|
# |___/
|
||||||
|
#
|
||||||
|
# Ryzom - MMORPG Framework <https://ryzom.com/dev/>
|
||||||
|
# Copyright (C) 2019 Winch Gate Property Limited
|
||||||
|
# This program is free software: read https://ryzom.com/dev/copying.html for more details
|
||||||
|
#
|
||||||
|
# This rc script is used to start all services of the shard into a screen session
|
||||||
|
#
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# SCREEN KEYBINDINGS
|
||||||
|
#
|
||||||
|
shell /bin/bash
|
||||||
|
defscrollback 5000
|
||||||
|
hardstatus on
|
||||||
|
hardstatus alwayslastline
|
||||||
|
hardstatus string "%{.kW}%-w%{.bW}%t [%n]%{-}%+w %=%{..G} %H %{..Y} %Y/%m/%d %c"
|
||||||
|
|
||||||
|
# Remove some stupid / dangerous key bindings
|
||||||
|
bind "^k"
|
||||||
|
bind "^\"
|
||||||
|
bindkey "^C" echo 'Blocked. Please use [Ctrl]+[A] + [Ctrl]+[Enter] + [Y]'
|
||||||
|
bindkey "^D" echo 'Blocked. Please use [Ctrl]+[A] + [Ctrl]+[Enter] + [Y]'
|
||||||
|
|
||||||
|
# Make them better
|
||||||
|
bind \\ quit
|
||||||
|
bind K kill
|
||||||
|
bind I login on
|
||||||
|
bind O login off
|
||||||
|
bindkey "^[[1;5D" prev
|
||||||
|
bindkey "^[[1;5C" next
|
||||||
|
|
||||||
|
# egs
|
||||||
|
screen -t EGS /bin/bash $SHARD_PATH/tools/service_launcher.sh egs ../sbin/ryzom_entities_game_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# ios
|
||||||
|
screen -t IOS /bin/bash $SHARD_PATH/tools/service_launcher.sh ios ../sbin/ryzom_ios_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# gpms
|
||||||
|
screen -t GPM /bin/bash $SHARD_PATH/tools/service_launcher.sh gpms ../sbin/ryzom_gpm_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# ais_newbieland
|
||||||
|
screen -t New /bin/bash $SHARD_PATH/tools/service_launcher.sh ais_newbieland ../sbin/ryzom_ai_service -C../cfgs -L../logs -Nais_newbieland --nobreak --writepid -mCommon:Newbieland:Post
|
||||||
|
|
||||||
|
# ais_fyros
|
||||||
|
screen -t Fyr /bin/bash $SHARD_PATH/tools/service_launcher.sh ais_fyros ../sbin/ryzom_ai_service -C../cfgs -L../logs -Nais_fyros --nobreak --writepid -mCommon:Indoors:Fyros:FyrosNewbie:FyrosIsland:Post
|
||||||
|
|
||||||
|
# ais_matis
|
||||||
|
screen -t Mat /bin/bash $SHARD_PATH/tools/service_launcher.sh ais_matis ../sbin/ryzom_ai_service -C../cfgs -L../logs -Nais_matis --nobreak --writepid -mCommon:Indoors:Matis:MatisNewbie:MatisIsland:Post
|
||||||
|
|
||||||
|
# ais_tryker
|
||||||
|
screen -t Trk /bin/bash $SHARD_PATH/tools/service_launcher.sh ais_tryker ../sbin/ryzom_ai_service -C../cfgs -L../logs -Nais_tryker --nobreak --writepid -mCommon:Indoors:Tryker:TrykerNewbie:TrykerIsland:Post
|
||||||
|
|
||||||
|
# ais_zorai
|
||||||
|
screen -t Zor /bin/bash $SHARD_PATH/tools/service_launcher.sh ais_zorai ../sbin/ryzom_ai_service -C../cfgs -L../logs -Nais_zorai --nobreak --writepid -mCommon:Indoors:Zorai:ZoraiNewbie:ZoraiIsland:Post
|
||||||
|
|
||||||
|
# ais_roots
|
||||||
|
screen -t Pri /bin/bash $SHARD_PATH/tools/service_launcher.sh ais_roots ../sbin/ryzom_ai_service -C../cfgs -L../logs -Nais_roots --nobreak --writepid -mCommon:Bagne:Nexus:RouteGouffre:Sources:Terre:Kitiniere:Post
|
||||||
|
|
||||||
|
#ais_ark
|
||||||
|
screen -t Ark /bin/bash $SHARD_PATH/tools/service_launcher.sh ais_ark ../sbin/ryzom_ai_service -C../cfgs -L../logs -Nais_ark --nobreak --writepid -mCommon:Indoors::R2Desert:R2Roots:R2Jungle:R2Forest:R2Lakes:Post
|
||||||
|
|
||||||
|
|
||||||
|
# aes
|
||||||
|
screen -t aes /bin/bash $SHARD_PATH/tools/service_launcher.sh aes ../sbin/ryzom_admin_service -A. -C../cfgs -L../logs --nobreak --fulladminname=admin_executor_service --shortadminname=AES
|
||||||
|
|
||||||
|
# bms_master
|
||||||
|
screen -t bms_master /bin/bash $SHARD_PATH/tools/service_launcher.sh bms_master ../sbin/ryzom_backup_service -C../cfgs -L../logs --nobreak --writepid -P49990
|
||||||
|
|
||||||
|
# su
|
||||||
|
screen -t su /bin/bash $SHARD_PATH/tools/service_launcher.sh su ../sbin/ryzom_shard_unifier_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# ras
|
||||||
|
screen -t ras /bin/bash $SHARD_PATH/tools/service_launcher.sh ras ../sbin/ryzom_admin_service --fulladminname=admin_service --shortadminname=AS -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
|
||||||
|
# bms_pd_master
|
||||||
|
#screen -t bms_pd_master /bin/bash $SHARD_PATH/tools/service_launcher.sh bms_pd_master ../sbin/ryzom_backup_service -C../cfgs -L../logs --nobreak --writepid -P49992
|
||||||
|
|
||||||
|
# rns
|
||||||
|
screen -t rns /bin/bash $SHARD_PATH/tools/service_launcher.sh rns ../sbin/ryzom_naming_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# rws
|
||||||
|
screen -t rws /bin/bash $SHARD_PATH/tools/service_launcher.sh rws ../sbin/ryzom_welcome_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# ts
|
||||||
|
screen -t ts /bin/bash $SHARD_PATH/tools/service_launcher.sh ts ../sbin/ryzom_tick_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# ms
|
||||||
|
screen -t ms /bin/bash $SHARD_PATH/tools/service_launcher.sh ms ../sbin/ryzom_mirror_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# mfs
|
||||||
|
screen -t mfs /bin/bash $SHARD_PATH/tools/service_launcher.sh mfs ../sbin/ryzom_mail_forum_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# fes
|
||||||
|
screen -t fes /bin/bash $SHARD_PATH/tools/service_launcher.sh fes ../sbin/ryzom_frontend_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# sbs
|
||||||
|
screen -t sbs /bin/bash $SHARD_PATH/tools/service_launcher.sh sbs ../sbin/ryzom_session_browser_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# lgs
|
||||||
|
screen -t lgs /bin/bash $SHARD_PATH/tools/service_launcher.sh lgs ../sbin/ryzom_logger_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# mos
|
||||||
|
screen -t mos /bin/bash $SHARD_PATH/tools/service_launcher.sh mos ../sbin/ryzom_monitor_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
# pdss
|
||||||
|
#screen -t pdss /bin/bash $SHARD_PATH/tools/service_launcher.sh pdss ../sbin/ryzom_pd_support_service -C../cfgs -L../logs --nobreak --writepid
|
||||||
|
|
||||||
|
|
||||||
|
termcapinfo xterm* 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007:ti@:te@'
|
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// This file contains all variables needed by other php scripts
|
||||||
|
$LogRelativePath = 'logs/';
|
||||||
|
$ShardName = 'MyShard';
|
||||||
|
$ShardId = '501';
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------------------
|
||||||
|
// Variables for nel database access
|
||||||
|
// ----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// where we can find the mysql database
|
||||||
|
$DBHost = 'localhost';
|
||||||
|
$DBUserName = 'USER';
|
||||||
|
$DBPassword = 'PASSWORD';
|
||||||
|
$DBName = 'nel';
|
||||||
|
|
||||||
|
$RingDBUserName = 'RING_USER';
|
||||||
|
$RingDBName = 'ring';
|
||||||
|
$RingDBPassword = 'RING_PASS';
|
||||||
|
|
||||||
|
$AcceptUnknownUser = true;
|
||||||
|
$AutoCreateRingInfo = true;
|
||||||
|
|
||||||
|
$RocketChatHook = '';
|
||||||
|
$RocketChatServer = '';
|
||||||
|
|
@ -0,0 +1,506 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
include_once('nel_message.php');
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
// WARNING : this is a generated file, don't change it !
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
class CAdminServiceWeb extends CCallbackClient
|
||||||
|
{
|
||||||
|
|
||||||
|
function globalCmd($command)
|
||||||
|
{
|
||||||
|
$msg = new CMessage;
|
||||||
|
$msg->setName("GCMD");
|
||||||
|
|
||||||
|
|
||||||
|
$msg->serialString($command);
|
||||||
|
|
||||||
|
return parent::sendMessage($msg);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function controlCmd($serviceAlias, $command)
|
||||||
|
{
|
||||||
|
$msg = new CMessage;
|
||||||
|
$msg->setName("CCMD");
|
||||||
|
|
||||||
|
|
||||||
|
$msg->serialString($serviceAlias);
|
||||||
|
$msg->serialString($command);
|
||||||
|
|
||||||
|
return parent::sendMessage($msg);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function serviceCmd($serviceAlias, $command)
|
||||||
|
{
|
||||||
|
$msg = new CMessage;
|
||||||
|
$msg->setName("SCMD");
|
||||||
|
|
||||||
|
|
||||||
|
$msg->serialString($serviceAlias);
|
||||||
|
$msg->serialString($command);
|
||||||
|
|
||||||
|
return parent::sendMessage($msg);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function getShardOrders()
|
||||||
|
{
|
||||||
|
$msg = new CMessage;
|
||||||
|
$msg->setName("GSO");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$ret = "";
|
||||||
|
$ret = parent::sendMessage($msg);
|
||||||
|
if ($ret == false)
|
||||||
|
{
|
||||||
|
// error during send
|
||||||
|
$this->invokeError("getShardOrders", "Error in 'sendMessage'");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$retMsg = parent::waitMessage();
|
||||||
|
if ($ret == false)
|
||||||
|
{
|
||||||
|
// error during send
|
||||||
|
$this->invokeError("getShardOrders", "Error in 'waitMessage'");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!($retMsg->MsgName === "R_GSO"))
|
||||||
|
{
|
||||||
|
// error during send
|
||||||
|
$this->invokeError("getShardOrders", "Invalid response, awaited 'R_GSO', received '".$retMsg->MsgName."'");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// serial the return value
|
||||||
|
$nbElem = 0;
|
||||||
|
$retMsg->serialUInt32($nbElem);
|
||||||
|
$retValue = array();
|
||||||
|
for ($i=0; $i<$nbElem;$i++)
|
||||||
|
{
|
||||||
|
$retMsg->serialString($item);
|
||||||
|
$retValue[] = $item;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// return the return value
|
||||||
|
return $retValue;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function getStates()
|
||||||
|
{
|
||||||
|
$msg = new CMessage;
|
||||||
|
$msg->setName("GS");
|
||||||
|
|
||||||
|
echo "ok";
|
||||||
|
|
||||||
|
$ret = "";
|
||||||
|
$ret = parent::sendMessage($msg);
|
||||||
|
if ($ret == false)
|
||||||
|
{
|
||||||
|
// error during send
|
||||||
|
$this->invokeError("getStates", "Error in 'sendMessage'");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
echo "ok";
|
||||||
|
$retMsg = parent::waitMessage();
|
||||||
|
if ($ret == false)
|
||||||
|
{
|
||||||
|
// error during send
|
||||||
|
$this->invokeError("getStates", "Error in 'waitMessage'");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
echo "ok";
|
||||||
|
if (!($retMsg->MsgName === "R_GS"))
|
||||||
|
{
|
||||||
|
// error during send
|
||||||
|
$this->invokeError("getStates", "Invalid response, awaited 'R_GS', received '".$retMsg->MsgName."'");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
echo "ok\n";
|
||||||
|
// serial the return value
|
||||||
|
$nbElem = 0;
|
||||||
|
$retMsg->serialUInt32($nbElem);
|
||||||
|
$retValue = array();
|
||||||
|
echo $nbElem."\n";
|
||||||
|
for ($i=0; $i<$nbElem;$i++)
|
||||||
|
{
|
||||||
|
$retMsg->serialString($item);
|
||||||
|
$retValue[] = $item;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// return the return value
|
||||||
|
return $retValue;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function getHighRezGraph($varAddr, $startDate, $endDate, $milliStep)
|
||||||
|
{
|
||||||
|
$msg = new CMessage;
|
||||||
|
$msg->setName("GHRG");
|
||||||
|
|
||||||
|
|
||||||
|
$msg->serialString($varAddr);
|
||||||
|
$msg->serialUint32($startDate);
|
||||||
|
$msg->serialUint32($endDate);
|
||||||
|
$msg->serialUint32($milliStep);
|
||||||
|
|
||||||
|
$ret = "";
|
||||||
|
$ret = parent::sendMessage($msg);
|
||||||
|
if ($ret == false)
|
||||||
|
{
|
||||||
|
// error during send
|
||||||
|
$this->invokeError("getHighRezGraph", "Error in 'sendMessage'");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$retMsg = parent::waitMessage();
|
||||||
|
if ($ret == false)
|
||||||
|
{
|
||||||
|
// error during send
|
||||||
|
$this->invokeError("getHighRezGraph", "Error in 'waitMessage'");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!($retMsg->MsgName === "R_GHRG"))
|
||||||
|
{
|
||||||
|
// error during send
|
||||||
|
$this->invokeError("getHighRezGraph", "Invalid response, awaited 'R_GHRG', received '".$retMsg->MsgName."'");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// serial the return value
|
||||||
|
$nbElem = 0;
|
||||||
|
$retMsg->serialUInt32($nbElem);
|
||||||
|
$retValue = array();
|
||||||
|
for ($i=0; $i<$nbElem;$i++)
|
||||||
|
{
|
||||||
|
$retMsg->serialString($item);
|
||||||
|
$retValue[] = $item;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// return the return value
|
||||||
|
return $retValue;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function waitCallback()
|
||||||
|
{
|
||||||
|
$message = parent::waitMessage();
|
||||||
|
|
||||||
|
if ($message == false)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
switch($message->MsgName)
|
||||||
|
{
|
||||||
|
case "CMDR":
|
||||||
|
$this->commandResult_skel($message);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function commandResult_skel(&$message)
|
||||||
|
{
|
||||||
|
$message->serialString($serviceAlias);
|
||||||
|
$message->serialString($result);
|
||||||
|
|
||||||
|
$this->commandResult($serviceAlias, $result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
// Copy paste this part of code in your derived class
|
||||||
|
// and implement code to ract to incoming message
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
function commandResult($serviceAlias, $result)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyAdminService extends CAdminServiceWeb
|
||||||
|
{
|
||||||
|
function commandResult($serviceModuleName, $result)
|
||||||
|
{
|
||||||
|
global $command_return_data;
|
||||||
|
|
||||||
|
$command_return_data = trim("===[ Service ". strtoupper($serviceModuleName) ." returned ]===\n". trim($result) ."\n\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function parseDumpGuildList($data)
|
||||||
|
{
|
||||||
|
$server = '';
|
||||||
|
$result = array();
|
||||||
|
|
||||||
|
reset($data);
|
||||||
|
foreach($data as $server_data)
|
||||||
|
{
|
||||||
|
$data_ary = explode("\n",$server_data);
|
||||||
|
reset($data_ary);
|
||||||
|
foreach($data_ary as $rline)
|
||||||
|
{
|
||||||
|
$rline = trim($rline);
|
||||||
|
|
||||||
|
if (preg_match('/^===\[ Service ([^\ ]+) returned \]===/', $rline, $params))
|
||||||
|
{
|
||||||
|
$server = $params[1];
|
||||||
|
$result[$server] = array();
|
||||||
|
$result[$server]['name'] = array();
|
||||||
|
$result[$server]['dump'] = array();
|
||||||
|
}
|
||||||
|
elseif (preg_match("/^id = ([[:digit:]]+)\:([[:digit:]]+) \(([^\ ]+)\) (\(0x[[:alnum:]]+\:[[:alnum:]]+\:[[:alnum:]]+\:[[:alnum:]]+\)), name = '([^\']+)', ([[:digit:]]+) members/",$rline,$params))
|
||||||
|
{
|
||||||
|
// id = 101:1 (Local) (0x0006500001:0c:00:88), name = 'Les Gardiens de l Atrium', 21 members
|
||||||
|
if ($server != '')
|
||||||
|
{
|
||||||
|
$result[$server]['dump'][] = $params;
|
||||||
|
$result[$server]['name'][] = $params[5];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function parseDumpOutpostList($data)
|
||||||
|
{
|
||||||
|
$server = '';
|
||||||
|
$result = array();
|
||||||
|
|
||||||
|
reset($data);
|
||||||
|
foreach($data as $server_data)
|
||||||
|
{
|
||||||
|
$data_ary = explode("\n",$server_data);
|
||||||
|
reset($data_ary);
|
||||||
|
foreach($data_ary as $rline)
|
||||||
|
{
|
||||||
|
$rline = trim($rline);
|
||||||
|
|
||||||
|
if (preg_match("/^([[:digit:]]+)\: Alias\: \((A\:[[:digit:]]+\:[[:digit:]]+)\), Name\: '([^\']+)', Sheet\: '([^\']+)', State\: '([^\']+)', Level\: ([[:digit:]]+), Owner\: '([^\']+)'/",$rline,$params))
|
||||||
|
{
|
||||||
|
$result[$params[3]] = $params;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function parseDisplayPlayers($data)
|
||||||
|
{
|
||||||
|
$server = '';
|
||||||
|
$result = array();
|
||||||
|
|
||||||
|
reset($data);
|
||||||
|
$data = str_replace('\\\'', '', $data);
|
||||||
|
|
||||||
|
foreach($data as $server_data)
|
||||||
|
{
|
||||||
|
$data_ary = explode("\n",$server_data);
|
||||||
|
reset($data_ary);
|
||||||
|
foreach($data_ary as $rline)
|
||||||
|
{
|
||||||
|
$rline = trim($rline);
|
||||||
|
|
||||||
|
if (preg_match('/^Player: ([[:digit:]]+) Name: ([^ ]+) ID: (\(0x[[:alnum:]]+\:[[:alnum:]]+\:[[:alnum:]]+\:[[:alnum:]]+\)) FE: [[:digit:]]+ Sheet: [a-z]+\.race_stats - [[:digit:]]+ Priv: ([^ ]+) Pos: ([0-9]+),(-[0-9]+),([0-9\-]+) Session: [0-9]01/',$rline,$params))
|
||||||
|
{
|
||||||
|
// Player: 723931 Name: Deodand(Atys) ID: (0x0000b0bdb0:00:00:8b) FE: 139 Sheet: tryker.race_stats - 533 Priv: \'\' Pos: 15264,-34428,-3 Session: 101
|
||||||
|
$result[$params[1]] = $params;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function parseDumpGuild($data)
|
||||||
|
{
|
||||||
|
$server = '';
|
||||||
|
$result = array();
|
||||||
|
|
||||||
|
reset($data);
|
||||||
|
foreach($data as $server_data)
|
||||||
|
{
|
||||||
|
$data_ary = explode("\n",$server_data);
|
||||||
|
|
||||||
|
reset($data_ary);
|
||||||
|
foreach($data_ary as $rline)
|
||||||
|
{
|
||||||
|
if (preg_match('/^===\[ Service ([^\ ]+) returned \]===/',$rline,$params))
|
||||||
|
{
|
||||||
|
$server = $params[1];
|
||||||
|
$result[$server] = array();
|
||||||
|
}
|
||||||
|
// <GUILD_DUMP> Guild id: 1, name: 'Les Gardiens de l Atrium', eid: (0x0000000001:0c:00:81)
|
||||||
|
//if (ereg("^[[:space:]]*\<GUILD_DUMP\> Guild id: ([[:digit:]]+), name: \'([[:alnum:]]+)\', eid: (\(0x[[:alnum:]]+\:[[:alnum:]]+\:[[:alnum:]]+\:[[:alnum:]]+\))$",$rline,$params))
|
||||||
|
elseif (preg_match('/^\<GUILD_DUMP\> Guild id: ([[:digit:]]+)\:([[:digit:]]+) \(([^\ ]+)\), name: \'([A-Za-z0-9\ _-]+)\', eid: (\(0x[[:alnum:]]+\:[[:alnum:]]+\:[[:alnum:]]+\:[[:alnum:]]+\))/',$rline,$params))
|
||||||
|
{
|
||||||
|
$guild_name = $params[4];
|
||||||
|
$result[$server] = array();
|
||||||
|
$result[$server]['dump'] = $params;
|
||||||
|
}
|
||||||
|
// Description: 'French CSR'
|
||||||
|
elseif (preg_match('/^[[:space:]]*Description: \'(.*)\'/',$rline,$params))
|
||||||
|
{
|
||||||
|
if ($server != '')
|
||||||
|
{
|
||||||
|
$result[$server]['desc'] = $params[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Icon: 0x0000000000000681
|
||||||
|
elseif (preg_match('/^[[:space:]]*Icon: (0x[[:alnum:]]+)/',$rline,$params))
|
||||||
|
{
|
||||||
|
if ($server != '')
|
||||||
|
{
|
||||||
|
$result[$server]['icon'] = hexdec($params[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Money: 65500000
|
||||||
|
elseif (preg_match('/^[[:space:]]*Money: ([[:alnum:]]+)/',$rline,$params))
|
||||||
|
{
|
||||||
|
if ($server != '')
|
||||||
|
{
|
||||||
|
$result[$server]['money'] = $params[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Race: Fyros
|
||||||
|
elseif (preg_match('/^[[:space:]]*Race: (.*)/',$rline,$params))
|
||||||
|
{
|
||||||
|
if ($server != '')
|
||||||
|
{
|
||||||
|
$result[$server]['race'] = $params[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Building: building_instance_FY_guild_327
|
||||||
|
elseif (preg_match('/^[[:space:]]*Building: (.*)/',$rline,$params))
|
||||||
|
{
|
||||||
|
if ($server != '')
|
||||||
|
{
|
||||||
|
$result[$server]['building'] = $params[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Civ Allegiance: Fyros
|
||||||
|
elseif (preg_match('/^[[:space:]]*Civ Allegiance: (.*)/',$rline,$params))
|
||||||
|
{
|
||||||
|
if ($server != '')
|
||||||
|
{
|
||||||
|
$result[$server]['civ'] = $params[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Cult Allegiance: Kami
|
||||||
|
elseif (preg_match('/^[[:space:]]*Cult Allegiance: (.*)/',$rline,$params))
|
||||||
|
{
|
||||||
|
if ($server != '')
|
||||||
|
{
|
||||||
|
$result[$server]['cult'] = $params[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Nb of members: 27
|
||||||
|
elseif (preg_match('/^[[:space:]]*Nb of members: ([[:digit:]]+)/',$rline,$params))
|
||||||
|
{
|
||||||
|
if ($server != '')
|
||||||
|
{
|
||||||
|
$result[$server]['count'] = $params[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Member 'Yotto' (0x00000096f0:00:00:86), index: 2, grade: HighOfficer, enter time: 60960905
|
||||||
|
elseif (preg_match('/^[[:space:]]*Member \'([^\ ]+)\' (\(0x[[:alnum:]]+\:[[:alnum:]]+\:[[:alnum:]]+\:[[:alnum:]]+\)), index: ([[:digit:]]+), grade: ([[:alnum:]]+), enter time: ([[:digit:]]+)/',$rline,$params))
|
||||||
|
{
|
||||||
|
if ($server != '')
|
||||||
|
{
|
||||||
|
$result[$server][$params[4]][] = $params[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function querySelectedShard($name, $service_name, $fullcmd, $cmd='', $waitCallback=true, $is_control=false) {
|
||||||
|
global $command_return_data;
|
||||||
|
|
||||||
|
$nel_result = array();
|
||||||
|
$nel_status = !$waitCallback;
|
||||||
|
|
||||||
|
$p_result = null;
|
||||||
|
|
||||||
|
$adminService = new MyAdminService;
|
||||||
|
|
||||||
|
if ($adminService->connect($name, '46700', $res) !== false) {
|
||||||
|
$command_return_data = '';
|
||||||
|
|
||||||
|
//echo "NEL[$service_name] : $service_command\n";
|
||||||
|
if (is_array($fullcmd)) {
|
||||||
|
foreach ($fullcmd as $service_command) {
|
||||||
|
if ($is_control)
|
||||||
|
$adminService->controlCmd($service_name, $service_command);
|
||||||
|
else
|
||||||
|
$adminService->serviceCmd($service_name, $service_command);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ($is_control)
|
||||||
|
$adminService->controlCmd($service_name, $fullcmd);
|
||||||
|
else
|
||||||
|
$adminService->serviceCmd($service_name, $fullcmd);
|
||||||
|
$service_command = $fullcmd;
|
||||||
|
//echo "NEL[$service_name] : OK\n";
|
||||||
|
if ($waitCallback && $adminService->waitCallback()) {
|
||||||
|
//echo "NEL[$service_name] : Successful!\n";
|
||||||
|
|
||||||
|
$nel_status = true;
|
||||||
|
$nel_result[] = $command_return_data;
|
||||||
|
//print_r($command_return_data);
|
||||||
|
} else {
|
||||||
|
//echo "NEL[$service_name] : Failed!\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@$adminService->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($nel_status) {
|
||||||
|
if (strlen($cmd) > 0) {
|
||||||
|
$func_name = 'parse'.ucfirst($cmd);
|
||||||
|
if (function_exists($func_name))
|
||||||
|
$p_result = call_user_func($func_name,$nel_result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return array('status' => $nel_status, 'query' => $service_name.':'.$service_command, 'raw' => $nel_result, 'parsed' => $p_result);
|
||||||
|
}
|
||||||
|
|
||||||
|
function queryShard($service_name, $fullcmd, $cmd='', $waitCallback=true, $is_control=false)
|
||||||
|
{
|
||||||
|
return querySelectedShard('localhost', $service_name, $fullcmd, $cmd, $waitCallback, $is_control);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,296 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$SockTimeOut = 10;
|
||||||
|
|
||||||
|
function debug($text)
|
||||||
|
{
|
||||||
|
// flush();
|
||||||
|
// echo $text;
|
||||||
|
}
|
||||||
|
|
||||||
|
class CMemStream
|
||||||
|
{
|
||||||
|
var $Buffer;
|
||||||
|
var $InputStream;
|
||||||
|
var $Pos;
|
||||||
|
|
||||||
|
function CMemStream ()
|
||||||
|
{
|
||||||
|
$this->InputStream = false;
|
||||||
|
$this->Pos = 0;
|
||||||
|
$this->Buffer = "";
|
||||||
|
debug("A : ".gettype($this->Buffer)."<br>");
|
||||||
|
}
|
||||||
|
|
||||||
|
function setBuffer ($Buffer)
|
||||||
|
{
|
||||||
|
$this->InputStream = true;
|
||||||
|
$this->Buffer = $Buffer;
|
||||||
|
$this->Pos = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function isReading () { return $this->InputStream; }
|
||||||
|
|
||||||
|
function serialUInt8 (&$val)
|
||||||
|
{
|
||||||
|
if ($this->isReading())
|
||||||
|
{
|
||||||
|
$val = ord($this->Buffer{$this->Pos++});
|
||||||
|
debug(sprintf ("read uint8 '%d'<br>\n", $val));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
debug("B".gettype($this->Buffer)."<br>");
|
||||||
|
debug(sprintf ("write uint8 Buffer size before = %u<br>\n", strlen($this->Buffer)));
|
||||||
|
$this->Buffer = $this->Buffer . chr($val & 0xFF);
|
||||||
|
$this->Pos++;
|
||||||
|
debug("C".gettype($this->Buffer)."<br>");
|
||||||
|
debug(sprintf ("write uint8 '%d' %d<br>\n", $val, $this->Pos));
|
||||||
|
debug(sprintf ("write uint8 Buffer size after = %u<br>\n", strlen($this->Buffer)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialUInt32 (&$val)
|
||||||
|
{
|
||||||
|
if ($this->isReading())
|
||||||
|
{
|
||||||
|
$val = ord($this->Buffer{$this->Pos++});
|
||||||
|
$val += ord($this->Buffer{$this->Pos++})*256;
|
||||||
|
$val += ord($this->Buffer{$this->Pos++})*(double)256*256;
|
||||||
|
$val += ord($this->Buffer{$this->Pos++})*(double)256*256*256;
|
||||||
|
debug(sprintf ("read uint32 '%d'<br>\n", $val));
|
||||||
|
// var_dump($val);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
debug("D".gettype($this->Buffer)."<br>");
|
||||||
|
$this->Buffer .= chr($val & 0xFF);
|
||||||
|
$this->Buffer .= chr(($val>>8) & 0xFF);
|
||||||
|
$this->Buffer .= chr(($val>>16) & 0xFF);
|
||||||
|
$this->Buffer .= chr(($val>>24) & 0xFF);
|
||||||
|
$this->Pos += 4;
|
||||||
|
debug("E".gettype($this->Buffer)."<br>");
|
||||||
|
debug(sprintf ("write uint32 '%d' %d<br>\n", $val, $this->Pos));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialString (&$val)
|
||||||
|
{
|
||||||
|
if ($this->isReading())
|
||||||
|
{
|
||||||
|
$this->serialUInt32($size);
|
||||||
|
debug(sprintf ("read string : size = %u<br>\n", $size));
|
||||||
|
$val = substr ($this->Buffer, $this->Pos, $size);
|
||||||
|
debug(sprintf ("read string '%s'<br>\n", $val));
|
||||||
|
$this->Pos += strlen($val);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$valLen = strlen($val);
|
||||||
|
$this->serialUInt32($valLen);
|
||||||
|
$this->Buffer .= $val;
|
||||||
|
$this->Pos += $valLen;
|
||||||
|
debug(sprintf ("write string '%s' %d<br>\n", $val, $this->Pos));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function serialEnum (&$val)
|
||||||
|
{
|
||||||
|
if ($this->isReading())
|
||||||
|
{
|
||||||
|
$intValue = 0;
|
||||||
|
$this->serialUInt32($intValue);
|
||||||
|
$val->fromInt((int)$intValue);
|
||||||
|
debug(sprintf ("read enum '%s'<br>\n", $val->toString()));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$intValue = $val->toInt();
|
||||||
|
$this->serialUInt32($intValue);
|
||||||
|
debug(sprintf ("write enum '%s' %d<br>\n", $val->toString(), $this->Pos));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CMessage extends CMemStream
|
||||||
|
{
|
||||||
|
var $MsgName;
|
||||||
|
|
||||||
|
function CMessage()
|
||||||
|
{
|
||||||
|
$this->CMemStream();
|
||||||
|
}
|
||||||
|
|
||||||
|
function setName($name)
|
||||||
|
{
|
||||||
|
$this->MsgName = $name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CCallbackClient
|
||||||
|
{
|
||||||
|
var $ConSock = false;
|
||||||
|
|
||||||
|
var $MsgNum = 0;
|
||||||
|
|
||||||
|
function connect($addr, $port, &$res)
|
||||||
|
{
|
||||||
|
global $SockTimeOut;
|
||||||
|
|
||||||
|
debug(sprintf("Connect<br>"));
|
||||||
|
$this->MsgNum = 0;
|
||||||
|
|
||||||
|
$this->ConSock = fsockopen ($addr, $port, $errno, $errstr, $SockTimeOut);
|
||||||
|
debug("H".gettype($this->ConSock)."<br>");
|
||||||
|
|
||||||
|
if (!$this->ConSock)
|
||||||
|
{
|
||||||
|
$res = "Can't connect to the callback server '$addr:$port' ($errno: $errstr)";
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// set time out on the socket to 2 secondes
|
||||||
|
stream_set_timeout($this->ConSock, $SockTimeOut);
|
||||||
|
$res = "";
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function close()
|
||||||
|
{
|
||||||
|
if ($this->ConSock)
|
||||||
|
{
|
||||||
|
fclose($this->ConSock);
|
||||||
|
debug(sprintf("Close<br>"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
debug(sprintf("Already Closed !<br>"));
|
||||||
|
}
|
||||||
|
|
||||||
|
function sendMessage(&$message)
|
||||||
|
{
|
||||||
|
if (!$this->ConSock)
|
||||||
|
{
|
||||||
|
debug(sprintf ("Socket is not valid\n"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
debug(sprintf ("sendMessage : message Buffer is '%d'<br>\n", $message->Pos));
|
||||||
|
debug(sprintf ("sendMessage : message Buffer is '%d'<br>\n", strlen($message->Buffer)));
|
||||||
|
$hd = new CMemStream;
|
||||||
|
debug(sprintf("SendMessage number %u<br>", $this->MsgNum));
|
||||||
|
$hd->serialUInt32 ($this->MsgNum); // number the packet
|
||||||
|
$this->MsgNum += 1;
|
||||||
|
debug(sprintf("After SendMessage, number %u<br>", $this->MsgNum));
|
||||||
|
$messageType = 0;
|
||||||
|
$hd->serialUInt8 ($messageType);
|
||||||
|
$hd->serialString ($message->MsgName);
|
||||||
|
|
||||||
|
debug(sprintf ("sendMessage : header size is '%d'<br>\n", $hd->Pos));
|
||||||
|
|
||||||
|
// $sb .= $message->Buffer;
|
||||||
|
|
||||||
|
$size = $hd->Pos + $message->Pos;
|
||||||
|
$Buffer = (string) chr(($size>>24)&0xFF);
|
||||||
|
$Buffer .= chr(($size>>16)&0xFF);
|
||||||
|
$Buffer .= chr(($size>>8)&0xFF);
|
||||||
|
$Buffer .= chr($size&0xFF);
|
||||||
|
debug( "E".gettype($hd->Buffer)."<br>");
|
||||||
|
debug("F".gettype($message->Buffer)."<br>");
|
||||||
|
$Buffer .= (string) $hd->Buffer;
|
||||||
|
$Buffer .= (string) $message->Buffer;
|
||||||
|
|
||||||
|
debug("G".gettype($this->ConSock)."<br>");
|
||||||
|
|
||||||
|
if (!fwrite ($this->ConSock, $Buffer))
|
||||||
|
{
|
||||||
|
debug(sprintf ("Error writing to socket\n"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
debug(sprintf ("sent packet size '%d' (written size = %d) <br>\n", strlen($Buffer), $size));
|
||||||
|
fflush ($this->ConSock);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function waitMessage()
|
||||||
|
{
|
||||||
|
if (!$this->ConSock)
|
||||||
|
{
|
||||||
|
debug(sprintf ("Socket is not valid\n"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$size = 0;
|
||||||
|
$val = fread ($this->ConSock, 1);
|
||||||
|
$info = stream_get_meta_data($this->ConSock);
|
||||||
|
if ($info['timed_out'])
|
||||||
|
{
|
||||||
|
debug('Connection timed out!');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$size = ord($val) << 24;
|
||||||
|
$val = fread ($this->ConSock, 1);
|
||||||
|
$info = stream_get_meta_data($this->ConSock);
|
||||||
|
if ($info['timed_out'])
|
||||||
|
{
|
||||||
|
debug('Connection timed out!');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$size = ord($val) << 16;
|
||||||
|
$val = fread ($this->ConSock, 1);
|
||||||
|
$info = stream_get_meta_data($this->ConSock);
|
||||||
|
if ($info['timed_out'])
|
||||||
|
{
|
||||||
|
debug('Connection timed out!');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$size += ord($val) << 8;
|
||||||
|
$val = fread ($this->ConSock, 1);
|
||||||
|
$info = stream_get_meta_data($this->ConSock);
|
||||||
|
if ($info['timed_out'])
|
||||||
|
{
|
||||||
|
debug('Connection timed out!');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$size += ord($val);
|
||||||
|
debug(sprintf ("receive packet size '%d'<br>\n", $size));
|
||||||
|
$fake = fread ($this->ConSock, 5);
|
||||||
|
$info = stream_get_meta_data($this->ConSock);
|
||||||
|
if ($info['timed_out'])
|
||||||
|
{
|
||||||
|
debug('Connection timed out!');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$size -= 5; // remove the fake
|
||||||
|
|
||||||
|
$Buffer = "";
|
||||||
|
while ($size > 0 && strlen($Buffer) != $size)
|
||||||
|
{
|
||||||
|
$Buffer .= fread ($this->ConSock, $size - strlen($Buffer));
|
||||||
|
$info = stream_get_meta_data($this->ConSock);
|
||||||
|
if ($info['timed_out'])
|
||||||
|
{
|
||||||
|
debug('Connection timed out!');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$msgin = new CMemStream;
|
||||||
|
$msgin->setBuffer ($Buffer);
|
||||||
|
|
||||||
|
// decode msg name
|
||||||
|
$msgin->serialString($name);
|
||||||
|
|
||||||
|
debug(sprintf("Message name = '%s'<BR>", $name));
|
||||||
|
$message = new CMessage;
|
||||||
|
$message->setBuffer(substr($msgin->Buffer, $msgin->Pos));
|
||||||
|
$message->setName($name);
|
||||||
|
|
||||||
|
debug(sprintf("In message name = '%s'<br>", $message->MsgName));
|
||||||
|
|
||||||
|
return $message;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
include_once(dirname(__DIR__).'/../config.php');
|
||||||
|
|
||||||
|
function getDomainInfo($domainId)
|
||||||
|
{
|
||||||
|
global $DBHost, $DBUserName, $DBPassword, $DBName;
|
||||||
|
|
||||||
|
$link = mysqli_connect($DBHost, $DBUserName, $DBPassword) or die("can't connect to nel db");
|
||||||
|
mysqli_select_db ($link, $DBName) or die("can't select nel db");
|
||||||
|
|
||||||
|
$domainId = (int)$domainId;
|
||||||
|
$query = "SELECT * FROM domain WHERE domain_id = $domainId";
|
||||||
|
$result = mysqli_query($link, $query) or die("query ($query) failed");
|
||||||
|
|
||||||
|
if (mysqli_num_rows($result) == 0)
|
||||||
|
{
|
||||||
|
die("Can't find row for domain ".$domainId);
|
||||||
|
}
|
||||||
|
|
||||||
|
$domainInfo = mysqli_fetch_array($result);
|
||||||
|
|
||||||
|
return $domainInfo;
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,249 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
include_once('validate_cookie.php');
|
||||||
|
include_once('domain_info.php');
|
||||||
|
include_once('ring_session_manager_itf.php');
|
||||||
|
|
||||||
|
class JoinShardCb extends CRingSessionManagerWeb
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Join the specified shard
|
||||||
|
*/
|
||||||
|
function joinSessionResult($userId, $sessionId, $result, $shardAddr, $participantStatus)
|
||||||
|
{
|
||||||
|
global $JoinSessionResultCode, $JoinSessionResultMsg;
|
||||||
|
$JoinSessionResultCode = $result;
|
||||||
|
$JoinSessionResultMsg = $shardAddr;
|
||||||
|
if ($result != 0)
|
||||||
|
{
|
||||||
|
global $FSHostLuaMode, $FSHostResult, $FSHostResultStr;
|
||||||
|
$FSHostResult = 0;
|
||||||
|
$FSHostResultStr = "Error ".$result." : '".$shardAddr."' while trying to join a shard";
|
||||||
|
if ($FSHostLuaMode)
|
||||||
|
{
|
||||||
|
echo $FSHostResultStr;
|
||||||
|
echo '<p><p><a href="web_start.php">Back to menu</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// ok, we have the info to connect !
|
||||||
|
// generate the lua script
|
||||||
|
$cookie=convertCookieForActionHandler($_COOKIE["ryzomId"]);
|
||||||
|
global $FSHostLuaMode, $FSHostResult, $FSHostResultStr;
|
||||||
|
$FSHostResult = 1;
|
||||||
|
$FSHostResultStr = $shardAddr;
|
||||||
|
if ($FSHostLuaMode)
|
||||||
|
{
|
||||||
|
$luaScript='runAH(nil, "on_connect_to_shard", "cookie='.$cookie.'|fsAddr='.$shardAddr.'")';
|
||||||
|
//echo 'luaScript : '.$luaScript.'<br>';
|
||||||
|
echo '<lua>'.$luaScript.'</lua>';
|
||||||
|
global $verbose;
|
||||||
|
if ($verbose)
|
||||||
|
echo '<br>Teleporting to shard<br>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Receive the result of the shard list, then call the global $getShardListCallback with the associative array as argument
|
||||||
|
*/
|
||||||
|
function getShardsResult($userId, $resultStr)
|
||||||
|
{
|
||||||
|
global $getShardListCallback;
|
||||||
|
|
||||||
|
$onlineShardsBySessionId = array();
|
||||||
|
$resultArray = split(';', $resultStr);
|
||||||
|
foreach ($resultArray as $shardInfo)
|
||||||
|
{
|
||||||
|
$shardAttr = split(',', $shardInfo);
|
||||||
|
if (isset($shardAttr[1]))
|
||||||
|
$onlineShardsBySessionId[$shardAttr[0]] = $shardAttr[1];
|
||||||
|
}
|
||||||
|
$getShardListCallback($onlineShardsBySessionId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// External use
|
||||||
|
$FSHostLuaMode = false;
|
||||||
|
$FSHostResultStr = 0;
|
||||||
|
|
||||||
|
// Internal use
|
||||||
|
$verbose = true;
|
||||||
|
$FSHostResult = 0;
|
||||||
|
|
||||||
|
// THE ABOVE DECLARATIONS ARE NEEDED FOR ALL CODE BELOW THIS LINE
|
||||||
|
if (isset($_POST["ml"]))
|
||||||
|
joinMainlandPost();
|
||||||
|
if (isset($_POST["destSessionId"]))
|
||||||
|
joinShardFromIdPost($_POST["destSessionId"]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Authenticate and request to join a mainland shard
|
||||||
|
*/
|
||||||
|
function joinMainlandPost()
|
||||||
|
{
|
||||||
|
global $FSHostLuaMode;
|
||||||
|
$FSHostLuaMode = true;
|
||||||
|
$domainId = -1;
|
||||||
|
if (!validateCookie($userId, $domainId, $charId))
|
||||||
|
{
|
||||||
|
echo "Invalid cookie !";
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
joinMainland($userId, $domainId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Authenticate and request to join the specified shard
|
||||||
|
*/
|
||||||
|
function joinShardFromIdPost( $destSessionId )
|
||||||
|
{
|
||||||
|
$domainId = -1;
|
||||||
|
if (!validateCookie($userId, $domainId, $charId))
|
||||||
|
{
|
||||||
|
echo "Invalid cookie !";
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
joinShardFromId($userId, $domainId, $destSessionId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request to join the specified shard
|
||||||
|
*/
|
||||||
|
function joinShardFromId( $userId, $domainId, $destSessionId )
|
||||||
|
{
|
||||||
|
$domainInfo = getDomainInfo($domainId);
|
||||||
|
$addr = split(":", $domainInfo["session_manager_address"]);
|
||||||
|
$RSMHost = $addr[0];
|
||||||
|
$RSMPort = $addr[1];
|
||||||
|
|
||||||
|
// request join to the session manager
|
||||||
|
$joinShard = new JoinShardCb;
|
||||||
|
$res = "";
|
||||||
|
$joinShard->connect($RSMHost, $RSMPort, $res);
|
||||||
|
$charSlot = getCharSlot(); // if ingame (!=15), the RSM can check if this character has the right to connect to the specified shard
|
||||||
|
$charId = ($userId<<4) + $charSlot;
|
||||||
|
echo "Requesting teleportation of $charId/$userId to shard session ".$destSessionId."...<br>";
|
||||||
|
$joinShard->joinSession($charId, $destSessionId, $domainInfo["domain_name"]);
|
||||||
|
|
||||||
|
// wait the the return message
|
||||||
|
if ($joinShard->waitCallback() == false)
|
||||||
|
{
|
||||||
|
// Note: the answer is a joinSessionResult message
|
||||||
|
echo "No response from server, joinShard failed<br>";
|
||||||
|
}
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request to get the shard list
|
||||||
|
*/
|
||||||
|
function getShardList($userId, $domainId)
|
||||||
|
{
|
||||||
|
$domainInfo = getDomainInfo($domainId);
|
||||||
|
$addr = split(":", $domainInfo["session_manager_address"]);
|
||||||
|
$RSMHost = $addr[0];
|
||||||
|
$RSMPort = $addr[1];
|
||||||
|
|
||||||
|
// request get to the session manager
|
||||||
|
$joinShard = new JoinShardCb;
|
||||||
|
$res = "";
|
||||||
|
$joinShard->connect($RSMHost, $RSMPort, $res);
|
||||||
|
|
||||||
|
$charId = ($userId<<4)+15;
|
||||||
|
echo "Retrieving online shards for $charId...<br>";
|
||||||
|
$joinShard->getShards($charId);
|
||||||
|
|
||||||
|
// wait the the return message
|
||||||
|
if ($joinShard->waitCallback() == false)
|
||||||
|
{
|
||||||
|
echo "No response from server, getShards failed<br>";
|
||||||
|
}
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the list of mainland shards
|
||||||
|
* This is a candidate to the callback $getShardListCallback
|
||||||
|
*/
|
||||||
|
function displayAllShards(&$onlineShardsBySessionId)
|
||||||
|
{
|
||||||
|
// Get the userId and domainId back
|
||||||
|
$domainId = -1;
|
||||||
|
if (!validateCookie($userId, $domainId, $charId))
|
||||||
|
{
|
||||||
|
echo "Invalid cookie !";
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
|
// List all shards of the domain, including offline ones
|
||||||
|
global $DBName;
|
||||||
|
mysql_select_db ($DBName) or die ("Can't access to the db dbname:$DBName");
|
||||||
|
$query = "select * from shard where domain_id = $domainId";
|
||||||
|
$resShards = mysql_query ($query) or die ("Can't execute the query: ".$query." ".mysql_error());
|
||||||
|
echo "Select a shard to join:<br>";
|
||||||
|
//echo "<form name='far_tp' action='join_shard.php' method='post'>";
|
||||||
|
while ($rowShard = mysql_fetch_array($resShards))
|
||||||
|
{
|
||||||
|
$mainlandSessionId = $rowShard['FixedSessionId'];
|
||||||
|
$isOnline = isset($onlineShardsBySessionId[$mainlandSessionId]);
|
||||||
|
// Radio button not supported by Client's html component. Instead: one form (button) per shard.
|
||||||
|
//echo "<input type='radio' name='destSessionId' value='".$mainlandSessionId."' ".($isOnline?"":"disabled ")."/>".$rowShard['Name']." (".($isOnline?"online with $nbOnlinePlayers players":"offline").", version ".$rowShard['Version'].")<br>";
|
||||||
|
echo "<form name='far_tp_".$rowShard['ShardId']."' action='join_shard.php' method='post'>";
|
||||||
|
echo "<input type='hidden' name='destSessionId' value='".$mainlandSessionId."' />";
|
||||||
|
echo "<input type='hidden' name='charSlot' value='".getCharSlot()."'>";
|
||||||
|
echo " ".$rowShard['Name']." ".$rowShard['ShardId']." (".($isOnline ? $onlineShardsBySessionId[$mainlandSessionId]." online)" : "offline)");
|
||||||
|
if ($isOnline)
|
||||||
|
echo "<input type='submit' name='button' value='Teleport' />";
|
||||||
|
echo "</form><br>";
|
||||||
|
}
|
||||||
|
|
||||||
|
//echo "<input type='submit' name='button' value='Teleport' />";
|
||||||
|
//echo "</form></font>";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Auto-join a shard.
|
||||||
|
* Returns true in case of success, and the FSHost address in $FSHostResultStr.
|
||||||
|
* Returns false in case of error, and an explanatory string in $FSHostResultStr.
|
||||||
|
*/
|
||||||
|
function joinMainland($userId, $domainId)
|
||||||
|
{
|
||||||
|
$domainInfo = getDomainInfo($domainId);
|
||||||
|
// $addr = split(":", $domainInfo["session_manager_address"]);
|
||||||
|
$addr = explode(":", $domainInfo["session_manager_address"]);
|
||||||
|
$RSMHost = $addr[0];
|
||||||
|
$RSMPort = $addr[1];
|
||||||
|
|
||||||
|
// request get to the session manager
|
||||||
|
$joinsShard = new JoinShardCb;
|
||||||
|
$res = "";
|
||||||
|
$joinsShard->connect($RSMHost, $RSMPort, $res);
|
||||||
|
|
||||||
|
// set the shard Id to allow any character (by using the special value '15')
|
||||||
|
$charId = ($userId<<4)+15;
|
||||||
|
global $FSHostLuaMode, $verbose;
|
||||||
|
if ($FSHostLuaMode && $verbose)
|
||||||
|
echo "Joining a mainland shard for $charId...<br>";
|
||||||
|
$joinsShard->joinMainland($charId, $domainInfo["domain_name"]);
|
||||||
|
|
||||||
|
// wait the the return message
|
||||||
|
if ($joinsShard->waitCallback() == false)
|
||||||
|
{
|
||||||
|
global $FSHostResultStr;
|
||||||
|
$FSHostResultStr = "No response from server for joinMainland<br>";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
global $FSHostResult;
|
||||||
|
return $FSHostResult;
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,108 @@
|
|||||||
|
<?php
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
// WARNING : this is a generated file, don't change it !
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require_once('tools/nel_message.php');
|
||||||
|
|
||||||
|
class CLoginServiceWeb extends CCallbackClient
|
||||||
|
{
|
||||||
|
|
||||||
|
function login($userId, $ipAddress, $domainId)
|
||||||
|
{
|
||||||
|
$msg = new CMessage;
|
||||||
|
$msg->setName("LG");
|
||||||
|
|
||||||
|
|
||||||
|
$msg->serialUint32($userId);
|
||||||
|
$msg->serialString($ipAddress);
|
||||||
|
$msg->serialUint32($domainId);
|
||||||
|
|
||||||
|
return parent::sendMessage($msg);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function logout($userId)
|
||||||
|
{
|
||||||
|
$msg = new CMessage;
|
||||||
|
$msg->setName("LO");
|
||||||
|
|
||||||
|
|
||||||
|
$msg->serialUint32($userId);
|
||||||
|
|
||||||
|
return parent::sendMessage($msg);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function waitCallback()
|
||||||
|
{
|
||||||
|
$message = parent::waitMessage();
|
||||||
|
|
||||||
|
if ($message == false)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
switch($message->MsgName)
|
||||||
|
{
|
||||||
|
case "LGR":
|
||||||
|
$this->loginResult_skel($message);
|
||||||
|
break;
|
||||||
|
case "LGOR":
|
||||||
|
$this->logoutResult_skel($message);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function loginResult_skel(&$message)
|
||||||
|
{
|
||||||
|
$message->serialUint32($userId);
|
||||||
|
$message->serialString($cookie);
|
||||||
|
$message->serialUint32($resultCode);
|
||||||
|
$message->serialString($errorString);
|
||||||
|
|
||||||
|
$this->loginResult($userId, $cookie, $resultCode, $errorString);
|
||||||
|
}
|
||||||
|
|
||||||
|
function logoutResult_skel(&$message)
|
||||||
|
{
|
||||||
|
$message->serialUint32($errorCode);
|
||||||
|
$message->serialString($reason);
|
||||||
|
|
||||||
|
$this->logoutResult($errorCode, $reason);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
// Copy paste this part of code in your derived class
|
||||||
|
// and implement code to ract to incoming message
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
// Return the cookie generated for this user session
|
||||||
|
// Eventualy, return an empty string as cookie in case of error
|
||||||
|
// resultCode : 0 - ok, login success
|
||||||
|
// 1 - invalid user
|
||||||
|
// 2 - user already online, must relog
|
||||||
|
// errorString contain a stringified description in case of error
|
||||||
|
|
||||||
|
function loginResult($userId, $cookie, $resultCode, $errorString)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return an error code for the logout attemp
|
||||||
|
// If return is not 0, then reason contains a debug string
|
||||||
|
// Return values : 0 - ok
|
||||||
|
// 1 - invalid user
|
||||||
|
// 2 - user already offline
|
||||||
|
|
||||||
|
function logoutResult($errorCode, $reason)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,310 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Message tables.
|
||||||
|
* Each msg can contain %0..%n arguments (see also errorMsg()).
|
||||||
|
* %0 contains the error code passed to errorMsg(), even if the text is factorized in another message linked with 'lnk'.
|
||||||
|
*/
|
||||||
|
|
||||||
|
$ErrMsgs = array();
|
||||||
|
|
||||||
|
// Generic error message
|
||||||
|
define('GENERIC_ERROR_NUM', 1000);
|
||||||
|
$ErrMsgs[1000]['dbg'] = 'Generic login error';
|
||||||
|
$ErrMsgs[1000]['en'] = 'Error';
|
||||||
|
$ErrMsgs[1000]['fr'] = 'Erreur';
|
||||||
|
$ErrMsgs[1000]['de'] = 'Error';
|
||||||
|
|
||||||
|
// Common public error messages
|
||||||
|
$msgMisconfiguredClient['en'] = 'Your client might be misconfigured, please contact support';
|
||||||
|
$msgMisconfiguredClient['fr'] = 'Il se peut que votre client soit mal configuré, merci de contacter le service client';
|
||||||
|
$msgMisconfiguredClient['de'] = 'Dein Client ist möglicherweise falsch konfiguriert, bitte kontaktiere den Support';
|
||||||
|
$msgOutOfDateClient['en'] = 'This client software is out of date, please visit www.ryzom.com to download a new client';
|
||||||
|
$msgOutOfDateClient['fr'] = 'Ce logiciel client est trop ancien, merci de télécharger un nouveau client sur www.ryzom.com';
|
||||||
|
$msgOutOfDateClient['de'] = 'Die Software ist nicht mehr aktuell bitte geh auf www.ryzom.com und lade dir den neuen Client herunter';
|
||||||
|
$msgLSInMaintenance['en'] = 'The log-in server is in maintenance, please try later';
|
||||||
|
$msgLSInMaintenance['fr'] = 'Le serveur de connexion est en maintenance, merci de réessayer plus tard';
|
||||||
|
$msgLSInMaintenance['de'] = 'Der Login-Server ist wegen Wartungsarbeiten offline, bitte versuch es später nochmal';
|
||||||
|
$msgDBInMaintenance['en'] = 'The database server is in maintenance, please try later';
|
||||||
|
$msgDBInMaintenance['fr'] = 'Le serveur de base de données est en maintenance, merci de réessayer plus tard';
|
||||||
|
$msgDBInMaintenance['de'] = 'Der Datenbank-Server ist wegen Wartungsarbeiten offline, bitte versuch es später nochmal';
|
||||||
|
$msgGameServersClosed['en'] = 'Game servers are currently closed or restricted, please retry later';
|
||||||
|
$msgGameServersClosed['fr'] = 'Les serveurs de jeu sont actuellement fermés ou à accès restreint, merci de réessayer plus tard';
|
||||||
|
$msgGameServersClosed['de'] = 'Die Spiel-Server sind momentan geschlossen oder gesperrt, bitte versuch es später nochmal';
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Main account error messages:
|
||||||
|
*/
|
||||||
|
$ErrMsgs[2001]['dbg'] = '(in %2)';
|
||||||
|
$ErrMsgs[2001]['en'] = 'Invalid account: %1'; // ex 52 and 64
|
||||||
|
$ErrMsgs[2001]['fr'] = 'Compte erroné : %1';
|
||||||
|
$ErrMsgs[2001]['de'] = 'Ungültiger Account: %1';
|
||||||
|
$ErrMsgs[2001]['log'] = false;
|
||||||
|
|
||||||
|
$ErrMsgs[2002]['en'] = "Your account must be activated first. Please read the email sent to %1.";
|
||||||
|
$ErrMsgs[2002]['fr'] = "Votre compte doit d'abord être activé. Merci de lire l'e-mail envoyé à %1.";
|
||||||
|
$ErrMsgs[2002]['de'] = "Dein Account muss noch aktiviert werden. Bitte befolge die Anweisungen, die wir per Mail an %1 geschickt haben.";
|
||||||
|
$ErrMsgs[2002]['log'] = false;
|
||||||
|
|
||||||
|
$ErrMsgs[2003]['en'] = "Your account must be activated first. Please read the email that has been sent to you.";
|
||||||
|
$ErrMsgs[2003]['fr'] = "Votre compte doit d'abord être activé. Merci de lire l'e-mail que nous vous avons envoyé.";
|
||||||
|
$ErrMsgs[2003]['de'] = "Dein Account muss noch aktiviert werden. Bitte befolge die Anweisungen, die wir per Mail an Dich geschickt haben.";
|
||||||
|
$ErrMsgs[2003]['log'] = false;
|
||||||
|
|
||||||
|
$ErrMsgs[2004]['dbg'] = '(in %2)'; // user => ex 56; signup_data => ex 56B
|
||||||
|
$ErrMsgs[2004]['en'] = "Invalid password";
|
||||||
|
$ErrMsgs[2004]['fr'] = "Mot de passe erroné";
|
||||||
|
$ErrMsgs[2004]['de'] = "Falsches Passwort";
|
||||||
|
$ErrMsgs[2004]['log'] = false;
|
||||||
|
|
||||||
|
// Translated Login Service error messages
|
||||||
|
define('BASE_TRANSLATED_LS_ERROR_NUM', 2100);
|
||||||
|
|
||||||
|
$ErrMsgs[2101]['dbg'] = '(LS error %1: %2 for userId %3)';
|
||||||
|
$ErrMsgs[2101]['en'] = 'Invalid account'; // ex 1?: 'invalid user'
|
||||||
|
$ErrMsgs[2101]['fr'] = 'Compte erroné';
|
||||||
|
$ErrMsgs[2101]['de'] = 'Ungültiger Account';
|
||||||
|
|
||||||
|
$ErrMsgs[2102]['dbg'] = '(LS error %1: %2 for userId %3)';
|
||||||
|
$ErrMsgs[2102]['en'] = 'Your account is already in online state, please retry in a few seconds'; // ex 2: 'User already online, please relog'
|
||||||
|
$ErrMsgs[2102]['fr'] = "Votre compte est encore dans l'état en ligne, merci de réessayer dans quelques secondes";
|
||||||
|
$ErrMsgs[2102]['de'] = 'Dein Account ist schon als online gekennzeichnet, bitte versuche es in ein paar Sekunden nochmals';
|
||||||
|
$ErrMsgs[2102]['log'] = false;
|
||||||
|
|
||||||
|
$ErrMsgs[2103]['dbg'] = '(LS error %1: %2 for userId %3)';
|
||||||
|
$ErrMsgs[2103]['en'] = 'Dual logging with a Privileged account is not permitted; this action has been logged and Gameforge CS has been notified';
|
||||||
|
$ErrMsgs[2103]['fr'] = 'TODO';
|
||||||
|
$ErrMsgs[2103]['de'] = 'TODO';
|
||||||
|
$ErrMsgs[2103]['mail'] = array('duallog@ryzom.com', "Dual Logging with GM account detected",
|
||||||
|
"UserId %3 attempted to log-in while related account (linked through GMId) was in online state (error code %0).\n".
|
||||||
|
"Message from server: %2\n".
|
||||||
|
"This could be a false positive if the user just disconnected without waiting for 30 s, and tried to log-in with their other account.");
|
||||||
|
|
||||||
|
$ErrMsgs[2104]['dbg'] = '(LS error %1: %2 for userId %3)';
|
||||||
|
$ErrMsgs[2104]['lnk'] = $ErrMsgs[2103];
|
||||||
|
|
||||||
|
$ErrMsgs[2105]['dbg'] = '(LS error %1: %2 for userId %3)';
|
||||||
|
$ErrMsgs[2105]['lnk'] = $ErrMsgs[2101];
|
||||||
|
|
||||||
|
$ErrMsgs[2106]['dbg'] = '(LS error %1: %2 for userId %3)';
|
||||||
|
$ErrMsgs[2106]['lnk'] = $msgDBInMaintenance;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Technical error messages:
|
||||||
|
* "visible" error messages (server down, etc.) are localized,
|
||||||
|
* unlike errors that should never occur (ex: bad parameters from client)
|
||||||
|
*/
|
||||||
|
define('BASE_TECHNICAL_ERROR_NUM', 3000);
|
||||||
|
|
||||||
|
$ErrMsgs[3001]['dbg'] = 'Failed to find a ring domain record for domainId: %1';
|
||||||
|
|
||||||
|
$ErrMsgs[3002]['dbg'] = 'Missing cmd';
|
||||||
|
|
||||||
|
$ErrMsgs[3003]['dbg'] = 'No response from Shard Unifier';
|
||||||
|
$ErrMsgs[3003]['lnk'] = $msgLSInMaintenance;
|
||||||
|
|
||||||
|
$ErrMsgs[3004]['dbg'] = "Can't connect to the %1 db server host:%2 user:%3";
|
||||||
|
$ErrMsgs[3004]['lnk'] = $msgDBInMaintenance;
|
||||||
|
|
||||||
|
$ErrMsgs[3005]['dbg'] = "Can't access the %1 database db:%2 host:%3 user:%4 (check privileges)";
|
||||||
|
$ErrMsgs[3005]['lnk'] = $msgDBInMaintenance;
|
||||||
|
|
||||||
|
$ErrMsgs[3006]['dbg'] = "Can't execute query '%1' on the %2 database db:%3 host:%4 user:%5 error:%6";
|
||||||
|
$ErrMsgs[3006]['lnk'] = $msgDBInMaintenance;
|
||||||
|
|
||||||
|
$ErrMsgs[3007]['dbg'] = "Can't find domain: %1"; // ex 'x'
|
||||||
|
$ErrMsgs[3007]['lnk'] = $msgMisconfiguredClient;
|
||||||
|
$ErrMsgs[3007]['add'] = 'dbg';
|
||||||
|
|
||||||
|
$ErrMsgs[3008]['dbg'] = "Login '%1' was created because it was not found in database"; // ex 50
|
||||||
|
|
||||||
|
$ErrMsgs[3009]['dbg'] = "Can't fetch login '%1' after insertion"; // ex 51
|
||||||
|
|
||||||
|
$ErrMsgs[3010]['dbg'] = "No permission found, but I need to accept Unknown user, so permission created, please RELOG";
|
||||||
|
|
||||||
|
$ErrMsgs[3011]['dbg'] = "(client application: %1 domain: %2)"; // ex 53
|
||||||
|
$ErrMsgs[3011]['en'] = "Your account needs a proper subscription to connect";
|
||||||
|
$ErrMsgs[3011]['fr'] = "Votre compte doit avoir un abonnement actif pour se connecter";
|
||||||
|
$ErrMsgs[3011]['de'] = 'Du kannst dich nicht ohne abgeschlossenes Abonemment in deinen Account einloggen';
|
||||||
|
$ErrMsgs[3011]['add'] = 'dbg';
|
||||||
|
$ErrMsgs[3011]['log'] = false;
|
||||||
|
|
||||||
|
$ErrMsgs[3012]['dbg'] = "No access privilege found for %1, but I need to accept Unknown user, so permission created, RELOG";
|
||||||
|
|
||||||
|
$ErrMsgs[3013]['dbg'] = "(client application: %1 domain: %2 reqPriv: %3)";
|
||||||
|
$ErrMsgs[3013]['en'] = "You don't have sufficient privilege to connect now, please try later";
|
||||||
|
$ErrMsgs[3013]['fr'] = "Vous n'avez pas les privilèges nécessaires pour vous connecter maintenant, veuillez essayer plus tard";
|
||||||
|
$ErrMsgs[3013]['de'] = 'Du hast nicht die nötigen Rechte um dich jetzt zu verbinden, bitte versuch es später nochmal';
|
||||||
|
$ErrMsgs[3013]['log'] = false;
|
||||||
|
|
||||||
|
// Translated Ring Session Manager (joinSession) error messages
|
||||||
|
define('BASE_TRANSLATED_RSM_ERROR_NUM', 4000);
|
||||||
|
|
||||||
|
$ErrMsgs[4001]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||||
|
$ErrMsgs[4002]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||||
|
$ErrMsgs[4003]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||||
|
$ErrMsgs[4004]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||||
|
|
||||||
|
$ErrMsgs[4005]['dbg'] = '(joinSession error %1: %2 for userId %3)';
|
||||||
|
$ErrMsgs[4005]['lnk'] = $msgGameServersClosed;
|
||||||
|
|
||||||
|
$ErrMsgs[4006]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||||
|
$ErrMsgs[4007]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||||
|
$ErrMsgs[4008]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||||
|
$ErrMsgs[4009]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||||
|
|
||||||
|
$ErrMsgs[4010]['dbg'] = '(joinSession error %1: %2 for userId %3)';
|
||||||
|
$ErrMsgs[4010]['lnk'] = $msgGameServersClosed;
|
||||||
|
|
||||||
|
$ErrMsgs[4011]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||||
|
$ErrMsgs[4012]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||||
|
$ErrMsgs[4013]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||||
|
|
||||||
|
$ErrMsgs[4014]['dbg'] = '(joinSession error %1: %2 for userId %3)';
|
||||||
|
$ErrMsgs[4014]['lnk'] = $msgGameServersClosed;
|
||||||
|
|
||||||
|
$ErrMsgs[4015]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||||
|
$ErrMsgs[4016]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||||
|
$ErrMsgs[4017]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||||
|
$ErrMsgs[4018]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||||
|
$ErrMsgs[4019]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||||
|
$ErrMsgs[4020]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||||
|
|
||||||
|
|
||||||
|
$MsgLanguages = array('en');
|
||||||
|
$DisplayDbg = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whenever a language information is known, use this method to refine the language used for error messages.
|
||||||
|
* Accepted values:
|
||||||
|
* 'en', 'fr', 'de', array of this values, or 'all' ('all' will display all versions)
|
||||||
|
*/
|
||||||
|
function setMsgLanguage($languages='en')
|
||||||
|
{
|
||||||
|
global $MsgLanguages;
|
||||||
|
if ($languages == 'all')
|
||||||
|
{
|
||||||
|
$MsgLanguages = $languages;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!is_array($languages))
|
||||||
|
$languages = array($languages);
|
||||||
|
foreach ($languages as $index => $lg)
|
||||||
|
{
|
||||||
|
switch ($lg)
|
||||||
|
{
|
||||||
|
case 'fr':
|
||||||
|
case 'de':;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$languages[$index] = 'en';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$MsgLanguages = $languages;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find the specified error message, and return the first found with the following precedence:
|
||||||
|
* 1. Current language(s) set by setMsgLangage()
|
||||||
|
* 2. English message
|
||||||
|
* 3. Debug message
|
||||||
|
* 4. Generic error
|
||||||
|
* Each language can be found through ['lnk'] if needed
|
||||||
|
* Tags (%1..%n) in the message are replaced by mixed arguments specified after $errNum.
|
||||||
|
* Ex: errorMsg(55, $domainName)
|
||||||
|
* if 'dbg' is found in ['add'] or $DisplayDbg is true, the 'dbg' version is appended to the found version.
|
||||||
|
*/
|
||||||
|
function errorMsg($errNum=GENERIC_ERROR_NUM) // $mixedArgs
|
||||||
|
{
|
||||||
|
// Find specified message using precedence rules
|
||||||
|
global $MsgLanguages;
|
||||||
|
$precedence = array(
|
||||||
|
array($errNum, ($MsgLanguages == 'all') ? array('en', 'fr', 'de') : $MsgLanguages),
|
||||||
|
array($errNum, array('en')),
|
||||||
|
array($errNum, array('dbg')),
|
||||||
|
array(GENERIC_ERROR_NUM, $MsgLanguages),
|
||||||
|
array(GENERIC_ERROR_NUM, array('en')));
|
||||||
|
global $ErrMsgs;
|
||||||
|
$args = func_get_args();
|
||||||
|
$msg = '';
|
||||||
|
foreach ($precedence as $rule)
|
||||||
|
{
|
||||||
|
// Find message
|
||||||
|
list($actualErrNum, $languages) = $rule;
|
||||||
|
foreach ($languages as $lg)
|
||||||
|
{
|
||||||
|
if (isset($ErrMsgs[$actualErrNum][$lg]) && ($ErrMsgs[$actualErrNum][$lg] != 'TODO'))
|
||||||
|
appendToMsg($msg, $errNum, $ErrMsgs[$actualErrNum][$lg], $args);
|
||||||
|
else if (isset($ErrMsgs[$actualErrNum]['lnk']) && isset($ErrMsgs[$actualErrNum]['lnk'][$lg]) && ($ErrMsgs[$actualErrNum]['lnk'][$lg] != 'TODO'))
|
||||||
|
appendToMsg($msg, $errNum, $ErrMsgs[$actualErrNum]['lnk'][$lg], $args);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Try next rule only if not found
|
||||||
|
if (!empty($msg))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add debug version if needed
|
||||||
|
global $DisplayDbg;
|
||||||
|
$msgHasDebug = in_array('dbg', $languages);
|
||||||
|
$logExtMsg = '';
|
||||||
|
if ((!$msgHasDebug) && isset($ErrMsgs[$actualErrNum]['dbg']))
|
||||||
|
{
|
||||||
|
if ($DisplayDbg || (isset($ErrMsgs[$actualErrNum]['add']) && ($ErrMsgs[$actualErrNum]['add'] == 'dbg')))
|
||||||
|
$msg .= '['.$ErrMsgs[$actualErrNum]['dbg']."]\n"; // to result/screen message
|
||||||
|
else
|
||||||
|
$logExtMsg .= '['.$ErrMsgs[$actualErrNum]['dbg'].']'; // to log message
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get mail data if specified
|
||||||
|
$mailData = (isset($ErrMsgs[$actualErrNum]['mail']) ? $ErrMsgs[$actualErrNum]['mail'] :
|
||||||
|
(isset($ErrMsgs[$actualErrNum]['lnk']['mail']) ? $ErrMsgs[$actualErrNum]['lnk']['mail'] :
|
||||||
|
array()));
|
||||||
|
|
||||||
|
// Apply params if applicable
|
||||||
|
$numArgs = func_num_args();
|
||||||
|
if ($numArgs > 1)
|
||||||
|
{
|
||||||
|
for ($i=0; $i!=$numArgs; ++$i) // include $errNum (%0)
|
||||||
|
{
|
||||||
|
$msg = str_replace("%$i", $args[$i], $msg);
|
||||||
|
$logExtMsg = str_replace("%$i", $args[$i], $logExtMsg);
|
||||||
|
$mIdx = 0;
|
||||||
|
foreach ($mailData as $field)
|
||||||
|
{
|
||||||
|
$mailData[$mIdx] = str_replace("%$i", $args[$i], $field);
|
||||||
|
++$mIdx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Log technical errors if possible
|
||||||
|
$logMode = (isset($ErrMsgs[$actualErrNum]['log']) ? $ErrMsgs[$actualErrNum]['log'] :
|
||||||
|
(isset($ErrMsgs[$actualErrNum]['lnk']['log']) ? $ErrMsgs[$actualErrNum]['lnk']['log'] :
|
||||||
|
true));
|
||||||
|
if ($logMode && class_exists('CWwwLog'))
|
||||||
|
{
|
||||||
|
$logFile = new CWwwLog();
|
||||||
|
$logFile->logStr(/*$msg.*/$logExtMsg); // message is already logged by ob_callback_r2login()
|
||||||
|
}
|
||||||
|
|
||||||
|
return $msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Helper for errorMsg()
|
||||||
|
function appendToMsg(&$msg, $errNum, $str, &$args)
|
||||||
|
{
|
||||||
|
$msg .= "$str ($errNum)";
|
||||||
|
if (($errNum == GENERIC_ERROR_NUM) && !empty($args))
|
||||||
|
{
|
||||||
|
foreach ($args as $arg)
|
||||||
|
{
|
||||||
|
$msg .= " [$arg]"; // display all passed args if returning the default generic error
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$msg .= "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
@ -0,0 +1,52 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
function _e($value) {
|
||||||
|
global $RingDb;
|
||||||
|
return mysqli_real_escape_string($RingDb->db, $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
class LoginDB {
|
||||||
|
|
||||||
|
function __construct($DBHost, $DBUserName, $DBPassword, $DefaultDBName) {
|
||||||
|
$this->host = $DBHost;
|
||||||
|
$this->user = $DBUserName;
|
||||||
|
$this->pass = $DBPassword;
|
||||||
|
$this->default_name = $DefaultDBName;
|
||||||
|
return $this->connect();
|
||||||
|
}
|
||||||
|
|
||||||
|
function connect() {
|
||||||
|
$this->db = mysqli_connect($this->host, $this->user, $this->pass) or die(errorMsgBlock(3004, 'DB', $this->host, $this->user));
|
||||||
|
return $this->db;
|
||||||
|
}
|
||||||
|
|
||||||
|
function select($db='') {
|
||||||
|
if ($db)
|
||||||
|
$this->name = $db;
|
||||||
|
else
|
||||||
|
$this->name = $this->default_name;
|
||||||
|
mysqli_select_db($this->db, $this->name) or die(errorMsgBlock(3005, 'DB', $this->name, $this->host, $this->user));
|
||||||
|
}
|
||||||
|
|
||||||
|
function query($query) {
|
||||||
|
$result = mysqli_query($this->db, $query) or die(errorMsgBlock(3006, $query, 'DB', $this->name, $this->host, $this->user, mysqli_error($this->db)));
|
||||||
|
$ret = array();
|
||||||
|
if (!is_bool($result)) {
|
||||||
|
while ($row = mysqli_fetch_array($result))
|
||||||
|
$ret[] = $row;
|
||||||
|
}
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
function querySingle($query) {
|
||||||
|
$result = mysqli_query($this->db, $query) or die(errorMsgBlock(3006, $query, 'DB', $this->name, $this->host, $this->user, mysqli_error($this->db)));
|
||||||
|
if (mysqli_num_rows($result))
|
||||||
|
return mysqli_fetch_array($result);
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getLastId() {
|
||||||
|
return mysqli_insert_id($this->db);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,56 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class ServerDomain {
|
||||||
|
|
||||||
|
function __construct($db, $clientApplication) {
|
||||||
|
$this->db = $db;
|
||||||
|
$this->db->select();
|
||||||
|
$this->domainInfo = $this->db->querySingle('SELECT * FROM domain WHERE domain_name = "'._e($clientApplication).'"');
|
||||||
|
if (!$this->domainInfo)
|
||||||
|
die('Can\'t find row for domain '.$clientApplication);
|
||||||
|
$this->id = $this->domainInfo['domain_id'];
|
||||||
|
$this->shardInfo = $this->db->querySingle('SELECT * FROM shard WHERE domain_id = "'.$this->id.'"');
|
||||||
|
if (!$this->shardInfo)
|
||||||
|
die('Can\'t find row for shard '.$clientApplication);
|
||||||
|
$this->domainInfo['shard'] = $this->shardInfo;
|
||||||
|
return $this->domainInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
function get($info) {
|
||||||
|
return $this->domainInfo[$info];
|
||||||
|
}
|
||||||
|
|
||||||
|
function getShard($info) {
|
||||||
|
return $this->domainInfo['shard'][$info];
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkStatus($status, $User) {
|
||||||
|
$error = '';
|
||||||
|
|
||||||
|
if ($status == 'ds_close')
|
||||||
|
$error = '0:Reboot sequence...';
|
||||||
|
else if ($status == 'ds_dev' && strstr($User->priv, ':DEV:') == false)
|
||||||
|
$error = '0:You are not allowed to connect now, retry later';
|
||||||
|
else if ($status == 'ds_restricted') {
|
||||||
|
if ( strstr($User->priv, ':DEV:') == false
|
||||||
|
&& strstr($User->priv, ':SGM:') == false
|
||||||
|
&& strstr($User->priv, ':GM:') == false
|
||||||
|
&& strstr($User->priv, ':EM:') == false
|
||||||
|
&& strstr($User->priv, ':EG:') == false
|
||||||
|
&& strstr($User->priv, ':TEST:') == false
|
||||||
|
) {
|
||||||
|
$error = '0: Reboot sequence...'."\n\n";
|
||||||
|
$error .= 'The server has been rebooted. The Ryzom Team are carefully inspecting the shard to get it ready for you.'."\n\n";
|
||||||
|
$error .= 'Le serveur a été redémarré. L\'équipe de Ryzom est en train de le vérifier méticuleusement et le prépare pour vous.'."\n\n";
|
||||||
|
$error .= 'Der Server wurde neu gestartet. Das Ryzom-Team führt eine ausführliche Überprüfung des Servers durch, um ihn für Dich vorzubereiten!'."\n\n";
|
||||||
|
$error .= 'El servidor va a reiniciar. El equipo de Ryzom está revisando suavemente el servidor y preparándolo para ti!'."\n\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($error) {
|
||||||
|
echo iconv('UTF-8', 'ISO-8859-1', $error);
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
class LoginCb extends CLoginServiceWeb {
|
||||||
|
|
||||||
|
function init($db, $ServerDomain) {
|
||||||
|
$this->db = $db;
|
||||||
|
$this->domainInfo = $ServerDomain->domainInfo;
|
||||||
|
$this->domainId = $ServerDomain->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// receive the login result sent back by the LS
|
||||||
|
function loginResult($userId, $cookie, $resultCode, $errorString) {
|
||||||
|
if ($resultCode == 0 && $cookie != '') {
|
||||||
|
// gather the domain informations (server version, patch urls and backup patch url
|
||||||
|
|
||||||
|
$RingWebHost = $this->domainInfo['web_host'];
|
||||||
|
$RingWebHostPHP = $this->domainInfo['web_host_php'];
|
||||||
|
|
||||||
|
// set the cookie
|
||||||
|
setcookie('ryzomId' , $cookie, 0, '/');
|
||||||
|
$_COOKIE['ryzomId'] = $cookie; // make it available immediately
|
||||||
|
|
||||||
|
// Auto-join an available mainland shard
|
||||||
|
global $FSHostLuaMode, $FSHostResultStr;
|
||||||
|
$FSHostLuaMode = false;
|
||||||
|
$res = joinMainland($userId, $this->domainId, $this->domainInfo['domain_name']);
|
||||||
|
|
||||||
|
if ($res) {
|
||||||
|
// return the cookie to the user, il will then be used as an auth to browse the site and to connect to the shard
|
||||||
|
//echo "1#".$cookie."#http://".$RingWebHost."/ring/web_start.php\n";
|
||||||
|
// use this line to use woopra stats
|
||||||
|
// echo "1#".$cookie."#".$FSHostResultStr."#http://".$RingWebHost."/ring/web_start.php#http://".$RingWebHostPHP."/ring/#1\n";
|
||||||
|
echo '1#'.$cookie.'#'.$FSHostResultStr.'#http://'.$RingWebHost.'/ring/web_start.php#http://'.$RingWebHostPHP.'/ring/'."\n";
|
||||||
|
// return the ring domain information
|
||||||
|
echo $this->domainInfo['patch_version'].'#'.$this->domainInfo['backup_patch_url'].'#'.$this->domainInfo['patch_urls'];
|
||||||
|
|
||||||
|
} else {
|
||||||
|
global $JoinSessionResultCode, $JoinSessionResultMsg;
|
||||||
|
echo errorMsgBlock(BASE_TRANSLATED_RSM_ERROR_NUM + $JoinSessionResultCode, $JoinSessionResultCode, $JoinSessionResultMsg, $userId);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// empty cookie, this mean the user id can't be validated by the LS
|
||||||
|
echo errorMsgBlock(BASE_TRANSLATED_LS_ERROR_NUM + $resultCode, $resultCode, $errorString, $userId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////
|
||||||
|
class CWwwLog {
|
||||||
|
//function CWwwLog() {}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Return the log directory. Create it if it does not exist, or return false if creation failed.
|
||||||
|
*/
|
||||||
|
function getSafeLogDir() {
|
||||||
|
$LogRelativePath = '/log';
|
||||||
|
$pathInfo = pathinfo(__FILE__);
|
||||||
|
$logPath = $pathInfo['dirname'].$LogRelativePath;
|
||||||
|
if (!is_dir($logPath))
|
||||||
|
{
|
||||||
|
$res = mkdir($LogPath, 0700);
|
||||||
|
return $res ? $logPath : false;
|
||||||
|
}
|
||||||
|
return $logPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
function logStr($str) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////
|
||||||
|
// see errorMsg
|
||||||
|
function errorMsgBlock($errNum=GENERIC_ERROR_NUM) // $mixedArgs
|
||||||
|
{
|
||||||
|
$args = func_get_args();
|
||||||
|
return '0:'.call_user_func_array('errorMsg', $args);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////
|
||||||
|
// Callback called on end of output buffering
|
||||||
|
function ob_callback_r2login($buffer)
|
||||||
|
{
|
||||||
|
// Log only in case of error or malformed result string
|
||||||
|
$blockHd = substr($buffer, 0, 2);
|
||||||
|
if ($blockHd != '1:')
|
||||||
|
{
|
||||||
|
$logFile = new CWwwLog();
|
||||||
|
$logFile->logStr(str_replace("\n",'\n',$buffer));
|
||||||
|
}
|
||||||
|
return $buffer; // sent to output
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////
|
||||||
|
// Callback called on error
|
||||||
|
function err_callback($errno, $errmsg, $filename, $linenum, $vars)
|
||||||
|
{
|
||||||
|
// don't log "PHP ERROR/2048 Only variables should be passed by reference"
|
||||||
|
if($errno == 2048) return;
|
||||||
|
|
||||||
|
$logFile = new CWwwLog();
|
||||||
|
$logFile->logStr("PHP ERROR/$errno $errmsg ($filename:$linenum)");
|
||||||
|
// Never die after an error
|
||||||
|
}
|
||||||
|
|
||||||
|
function dieError($errNum=GENERIC_ERROR_NUM) // $mixedArgs
|
||||||
|
{
|
||||||
|
$args = func_get_args();
|
||||||
|
die('0:'.call_user_func_array('errorMsg', $args));
|
||||||
|
}
|
@ -0,0 +1,108 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class RingUser {
|
||||||
|
|
||||||
|
function __construct($db, $login, $password, $clientApplication, $submittedLang) {
|
||||||
|
global $AcceptUnknownUser;
|
||||||
|
$this->db = $db;
|
||||||
|
$this->login = $login;
|
||||||
|
$this->password = $password;
|
||||||
|
$this->lang = $submittedLang;
|
||||||
|
$this->client = $clientApplication;
|
||||||
|
|
||||||
|
$this->db->select();
|
||||||
|
|
||||||
|
$this->user = $this->db->querySingle('SELECT * FROM user WHERE Login="'._e($this->login).'"');
|
||||||
|
if ($this->user) {
|
||||||
|
$this->uid = $this->user['UId'];
|
||||||
|
} else {
|
||||||
|
if ($AcceptUnknownUser && $this->password) {
|
||||||
|
$this->db->query('INSERT INTO user SET Login = "'._e($this->login).'", Password = "'._e($this->password).'", ShardId=-1, Privilege=":DEV:"');
|
||||||
|
$this->user = $this->db->querySingle('SELECT * FROM user WHERE Login="'._e($this->login).'"');
|
||||||
|
$this->uid = $this->user['UId'];
|
||||||
|
} else {
|
||||||
|
$this->uid = 0;
|
||||||
|
$this->user = array('Password' => 'AA');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->authenticate = False;
|
||||||
|
setMsgLanguage($submittedLang);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function askSalt() {
|
||||||
|
$user = $this->user;
|
||||||
|
if ($user)
|
||||||
|
echo '1:'.substr($user['Password'], 0, 2);
|
||||||
|
else
|
||||||
|
dieError(2001, '', 'askSalt');
|
||||||
|
}
|
||||||
|
|
||||||
|
function createRingInfo($ServerDomain) {
|
||||||
|
$domainInfo = $ServerDomain->domainInfo;
|
||||||
|
$this->db->select($domainInfo['ring_db_name']);
|
||||||
|
$result = $this->db->querySingle('SELECT user_id FROM ring_users where user_id = "'._e($this->uid).'"');
|
||||||
|
if (!$result)
|
||||||
|
$this->db->query('INSERT INTO ring_users SET user_id = "'._e($this->uid).'", user_name = "'._e($this->login).'", user_type="ut_pioneer"');
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkAccess() {
|
||||||
|
}
|
||||||
|
|
||||||
|
function updatePrivs($privs) {
|
||||||
|
$this->db->query('UPDATE user SET ExtendedPrivilege="'._e($privs).'" WHERE UId='._e($this->uid));
|
||||||
|
$this->user['ExtendedPrivilege'] = $privs;
|
||||||
|
}
|
||||||
|
|
||||||
|
function addPriv($priv) {
|
||||||
|
$eprivs = explode(':', $this->user['ExtendedPrivilege']);
|
||||||
|
$privs = array();
|
||||||
|
foreach ($eprivs as $p)
|
||||||
|
$privs[$p] = $p;
|
||||||
|
unset($privs['']);
|
||||||
|
$privs[$priv] = $priv;
|
||||||
|
$this->updatePrivs(':'.implode(':', array_keys($privs)).':');
|
||||||
|
}
|
||||||
|
|
||||||
|
function removePriv($priv) {
|
||||||
|
$eprivs = explode(':', $this->user['ExtendedPrivilege']);
|
||||||
|
$privs = array();
|
||||||
|
foreach ($eprivs as $p)
|
||||||
|
$privs[$p] = $p;
|
||||||
|
unset($privs['']);
|
||||||
|
unset($privs[$priv]);
|
||||||
|
$this->updatePrivs(':'.implode(':', array_keys($privs)).':');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function checkPermission($ServerDomain) {
|
||||||
|
$perm = $this->db->querySingle('SELECT * FROM permission WHERE UId="'._e($this->uid).'" AND ClientApplication="'._e($this->client).'"');
|
||||||
|
if (!$perm)
|
||||||
|
$this->db->query('INSERT INTO permission (UId, ClientApplication, ShardId, AccessPrivilege) VALUES ("'._e($this->uid).'", "'._e($this->client).'", "'.$ServerDomain->getShard('ShardId').'", "OPEN")');
|
||||||
|
}
|
||||||
|
|
||||||
|
function logConnection() {
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkValidity($password, $ServerDomain) {
|
||||||
|
$user = $this->user;
|
||||||
|
|
||||||
|
if (!$user)
|
||||||
|
dieError(3009, $this->login);
|
||||||
|
|
||||||
|
if ($this->user['Password'] == $password) {
|
||||||
|
$this->login = $this->user['Login']; // Correct case
|
||||||
|
|
||||||
|
$this->checkAccess();
|
||||||
|
$this->checkPermission($ServerDomain);
|
||||||
|
$this->logConnection();
|
||||||
|
|
||||||
|
$this->priv = $this->user['Privilege'];
|
||||||
|
|
||||||
|
return True;
|
||||||
|
} else
|
||||||
|
dieError(2004);
|
||||||
|
return False;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,79 @@
|
|||||||
|
<?php
|
||||||
|
include_once(dirname(__DIR__).'/../config.php');
|
||||||
|
|
||||||
|
function convertCookieForActionHandler($cookie)
|
||||||
|
{
|
||||||
|
$ret = "";
|
||||||
|
for ($i = 0; $i<strlen($cookie); ++$i)
|
||||||
|
{
|
||||||
|
if ($cookie[$i] == '|')
|
||||||
|
$ret .= '_';
|
||||||
|
else
|
||||||
|
$ret .= $cookie[$i];
|
||||||
|
}
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
function validateCookie(&$userId, &$domainId, &$charId)
|
||||||
|
{
|
||||||
|
global $DBHost, $DBUserName, $DBPassword, $DBName, $RingDBName, $AcceptUnknownUser;
|
||||||
|
|
||||||
|
if (!isset($_COOKIE["ryzomId"]))
|
||||||
|
{
|
||||||
|
echo "Cookie not found<BR>";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// read the ip and compare with client ip
|
||||||
|
$cookie = $_COOKIE["ryzomId"];
|
||||||
|
echo "Cookie is $cookie<BR>";
|
||||||
|
sscanf($cookie, "%02X%02X%02X%02X", $b0, $b1, $b2, $b3);
|
||||||
|
$addr = $b0 + ($b1<<8) + ($b2<<16) + ($b3<<24);
|
||||||
|
printf("Addr is %X<BR>", $addr);
|
||||||
|
$addrStr = long2ip($addr);
|
||||||
|
echo "addrStr is $addrStr<br>";
|
||||||
|
|
||||||
|
if ($_SERVER["REMOTE_ADDR"] != $addrStr)
|
||||||
|
{
|
||||||
|
echo "Client ip don't match cookie<BR>";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// check the cookie in the database
|
||||||
|
$link = mysqli_connect($DBHost, $DBUserName, $DBPassword) or die ("Can't connect to database host:$DBHost user:$DBUserName");
|
||||||
|
mysqli_select_db($link, $RingDBName) or die ("Can't access to the table dbname:$RingDBName");
|
||||||
|
$query = "SELECT user_id, current_status, current_domain_id FROM ring_users where cookie='$cookie'";
|
||||||
|
$result = mysqli_query($link, $query) or die ("Can't execute the query: ".$query);
|
||||||
|
|
||||||
|
if (mysqli_num_rows($result) == 0)
|
||||||
|
{
|
||||||
|
echo "Can't find cookie $cookie in database<BR>";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$row = mysqli_fetch_array($result);
|
||||||
|
|
||||||
|
if ($row["current_status"] != "cs_logged" && $row["current_status"] != "cs_online" )
|
||||||
|
{
|
||||||
|
echo "User $row[user_id] is not looged or online<BR>";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$userId = $row["user_id"];
|
||||||
|
$domainId = $row["current_domain_id"];
|
||||||
|
// $charId = ($userId*16) + (getCharSlot()) & 0xf;
|
||||||
|
$charId = $userId*16 + getCharSlot();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCharSlot()
|
||||||
|
{
|
||||||
|
global $_GET, $_POST;
|
||||||
|
if (isset($_GET["charSlot"]))
|
||||||
|
return $_GET["charSlot"];
|
||||||
|
else if (isset($_POST["charSlot"]))
|
||||||
|
return $_POST["charSlot"];
|
||||||
|
else
|
||||||
|
return 0; // temp dev: use 0 as the "ring character"
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
// WARNING : this is a generated file, don't change it !
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
$arrayCounter = 0;
|
||||||
|
$WS_TUserRole_EnumValues[$arrayCounter++] = "ur_player";
|
||||||
|
$WS_TUserRole_EnumValues[$arrayCounter++] = "ur_editor";
|
||||||
|
$WS_TUserRole_EnumValues[$arrayCounter++] = "ur_animator";
|
||||||
|
$WS_TUserRole_EnumValues[$arrayCounter] = "invalid";
|
||||||
|
$WS_TUserRole_InvalidValue = $arrayCounter;
|
||||||
|
|
||||||
|
class WS_TUserRole
|
||||||
|
{
|
||||||
|
var $Value;
|
||||||
|
|
||||||
|
function WS_TUserRole()
|
||||||
|
{
|
||||||
|
global $WS_TUserRole_InvalidValue;
|
||||||
|
$this->Value = $WS_TUserRole_InvalidValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
function toString()
|
||||||
|
{
|
||||||
|
global $WS_TUserRole_EnumValues;
|
||||||
|
return $WS_TUserRole_EnumValues[$this->Value];
|
||||||
|
}
|
||||||
|
|
||||||
|
function fromString($strValue)
|
||||||
|
{
|
||||||
|
global $WS_TUserRole_EnumValues;
|
||||||
|
foreach ($WS_TUserRole_EnumValues as $k => $v)
|
||||||
|
{
|
||||||
|
if ($strValue === $v)
|
||||||
|
{
|
||||||
|
$this->Value = $k;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->Value = $WS_TUserRole_InvalidValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
function toInt()
|
||||||
|
{
|
||||||
|
return $this->Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
function fromInt($intValue)
|
||||||
|
{
|
||||||
|
global $WS_TUserRole_InvalidValue;
|
||||||
|
global $WS_TUserRole_EnumValues;
|
||||||
|
if (array_key_exists($intValue, $WS_TUserRole_EnumValues))
|
||||||
|
$this->Value = $intValue;
|
||||||
|
else
|
||||||
|
$this->Value = $WS_TUserRole_InvalidValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,201 @@
|
|||||||
|
-- phpMyAdmin SQL Dump
|
||||||
|
-- version 4.8.5
|
||||||
|
-- https://www.phpmyadmin.net/
|
||||||
|
--
|
||||||
|
-- Hôte : localhost:3306
|
||||||
|
-- Généré le : jeu. 21 fév. 2019 à 23:46
|
||||||
|
-- Version du serveur : 5.7.25-0ubuntu0.18.04.2
|
||||||
|
-- Version de PHP : 7.2.15-0ubuntu0.18.04.1
|
||||||
|
|
||||||
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||||
|
SET AUTOCOMMIT = 0;
|
||||||
|
START TRANSACTION;
|
||||||
|
SET time_zone = "+00:00";
|
||||||
|
|
||||||
|
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||||
|
/*!40101 SET NAMES utf8mb4 */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Base de données : `nel`
|
||||||
|
--
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Structure de la table `domain`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `domain` (
|
||||||
|
`domain_id` int(10) UNSIGNED NOT NULL,
|
||||||
|
`domain_name` varchar(32) NOT NULL DEFAULT '',
|
||||||
|
`status` enum('ds_close','ds_dev','ds_restricted','ds_open') NOT NULL DEFAULT 'ds_dev',
|
||||||
|
`patch_version` int(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||||
|
`backup_patch_url` varchar(255) DEFAULT NULL,
|
||||||
|
`patch_urls` text,
|
||||||
|
`login_address` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`session_manager_address` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`ring_db_name` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`web_host` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`web_host_php` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`description` varchar(200) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Structure de la table `permission`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `permission` (
|
||||||
|
`UId` int(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||||
|
`ClientApplication` char(64) NOT NULL DEFAULT 'r2',
|
||||||
|
`ShardId` int(10) NOT NULL DEFAULT '-1',
|
||||||
|
`AccessPrivilege` set('DEV','RESTRICTED','OPEN') NOT NULL DEFAULT 'OPEN',
|
||||||
|
`prim` int(10) UNSIGNED NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Structure de la table `shard`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `shard` (
|
||||||
|
`ShardId` int(10) NOT NULL DEFAULT '0',
|
||||||
|
`domain_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||||
|
`WsAddr` varchar(64) DEFAULT NULL,
|
||||||
|
`NbPlayers` int(10) UNSIGNED DEFAULT '0',
|
||||||
|
`Name` varchar(255) DEFAULT 'unknown shard',
|
||||||
|
`WSOnline` tinyint(1) UNSIGNED DEFAULT '0',
|
||||||
|
`ClientApplication` varchar(64) DEFAULT 'ryzom',
|
||||||
|
`Version` varchar(64) NOT NULL DEFAULT '',
|
||||||
|
`PatchURL` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`DynPatchURL` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`FixedSessionId` int(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||||
|
`State` enum('ds_close','ds_dev','ds_restricted','ds_open') NOT NULL DEFAULT 'ds_dev',
|
||||||
|
`MOTD` text NOT NULL,
|
||||||
|
`prim` int(10) UNSIGNED NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='contains all shards informations for login system';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Structure de la table `user`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `user` (
|
||||||
|
`UId` int(10) NOT NULL,
|
||||||
|
`Login` varchar(64) NOT NULL DEFAULT '',
|
||||||
|
`Password` varchar(13) DEFAULT NULL,
|
||||||
|
`ShardId` int(10) NOT NULL DEFAULT '-1',
|
||||||
|
`State` enum('Offline','Online') NOT NULL DEFAULT 'Offline',
|
||||||
|
`Privilege` varchar(255) DEFAULT NULL,
|
||||||
|
`GroupName` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`FirstName` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`LastName` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`Birthday` varchar(32) NOT NULL DEFAULT '',
|
||||||
|
`Gender` tinyint(1) UNSIGNED NOT NULL DEFAULT '0',
|
||||||
|
`Country` char(2) NOT NULL DEFAULT '',
|
||||||
|
`Email` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`Address` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`City` varchar(100) NOT NULL DEFAULT '',
|
||||||
|
`PostalCode` varchar(10) NOT NULL DEFAULT '',
|
||||||
|
`USState` char(2) NOT NULL DEFAULT '',
|
||||||
|
`Chat` char(2) NOT NULL DEFAULT '0',
|
||||||
|
`BetaKeyId` int(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||||
|
`CachedCoupons` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`ProfileAccess` varchar(45) DEFAULT NULL,
|
||||||
|
`Level` int(2) NOT NULL DEFAULT '0',
|
||||||
|
`CurrentFunds` int(4) NOT NULL DEFAULT '0',
|
||||||
|
`IdBilling` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`Community` char(2) NOT NULL DEFAULT '--',
|
||||||
|
`Newsletter` tinyint(1) NOT NULL DEFAULT '1',
|
||||||
|
`Account` varchar(64) NOT NULL DEFAULT '',
|
||||||
|
`ChoiceSubLength` tinyint(2) NOT NULL DEFAULT '0',
|
||||||
|
`CurrentSubLength` varchar(255) NOT NULL DEFAULT '0',
|
||||||
|
`ValidIdBilling` int(4) NOT NULL DEFAULT '0',
|
||||||
|
`GMId` int(4) NOT NULL DEFAULT '0',
|
||||||
|
`ExtendedPrivilege` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`ToolsGroup` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`Unsubscribe` date DEFAULT NULL,
|
||||||
|
`SubDate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
`SubIp` varchar(20) NOT NULL DEFAULT '',
|
||||||
|
`SecurePassword` varchar(32) NOT NULL DEFAULT '',
|
||||||
|
`LastInvoiceEmailCheck` date DEFAULT NULL,
|
||||||
|
`FromSource` varchar(8) NOT NULL DEFAULT '',
|
||||||
|
`ValidMerchantCode` varchar(11) NOT NULL DEFAULT '',
|
||||||
|
`PBC` tinyint(1) NOT NULL DEFAULT '0'
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Index pour les tables déchargées
|
||||||
|
--
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Index pour la table `domain`
|
||||||
|
--
|
||||||
|
ALTER TABLE `domain`
|
||||||
|
ADD PRIMARY KEY (`domain_id`),
|
||||||
|
ADD UNIQUE KEY `name_idx` (`domain_name`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Index pour la table `permission`
|
||||||
|
--
|
||||||
|
ALTER TABLE `permission`
|
||||||
|
ADD PRIMARY KEY (`prim`),
|
||||||
|
ADD KEY `UIdIndex` (`UId`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Index pour la table `shard`
|
||||||
|
--
|
||||||
|
ALTER TABLE `shard`
|
||||||
|
ADD PRIMARY KEY (`prim`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Index pour la table `user`
|
||||||
|
--
|
||||||
|
ALTER TABLE `user`
|
||||||
|
ADD PRIMARY KEY (`UId`),
|
||||||
|
ADD KEY `LoginIndex` (`Login`),
|
||||||
|
ADD KEY `GroupIndex` (`GroupName`),
|
||||||
|
ADD KEY `Email` (`Email`),
|
||||||
|
ADD KEY `ToolsGroup` (`ToolsGroup`),
|
||||||
|
ADD KEY `CurrentSubLength` (`CurrentSubLength`),
|
||||||
|
ADD KEY `Community` (`Community`),
|
||||||
|
ADD KEY `GMId` (`GMId`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT pour les tables déchargées
|
||||||
|
--
|
||||||
|
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT pour la table `domain`
|
||||||
|
--
|
||||||
|
ALTER TABLE `domain`
|
||||||
|
MODIFY `domain_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT pour la table `permission`
|
||||||
|
--
|
||||||
|
ALTER TABLE `permission`
|
||||||
|
MODIFY `prim` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT pour la table `shard`
|
||||||
|
--
|
||||||
|
ALTER TABLE `shard`
|
||||||
|
MODIFY `prim` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT pour la table `user`
|
||||||
|
--
|
||||||
|
ALTER TABLE `user`
|
||||||
|
MODIFY `UId` int(10) NOT NULL AUTO_INCREMENT;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
@ -0,0 +1,66 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
error_reporting(E_ALL);
|
||||||
|
|
||||||
|
include_once('../../config.php');
|
||||||
|
include_once('../../libs/nel_message.php');
|
||||||
|
include_once('libs/login_translations.php');
|
||||||
|
include_once('libs/login_service_itf.php');
|
||||||
|
include_once('libs/domain_info.php');
|
||||||
|
include_once('libs/join_shard.php');
|
||||||
|
|
||||||
|
include_once('libs/r2_login_db.php');
|
||||||
|
include_once('libs/r2_login_logs.php');
|
||||||
|
include_once('libs/r2_login_logincb.php');
|
||||||
|
include_once('libs/r2_login_domain.php');
|
||||||
|
include_once('libs/r2_login_user.php');
|
||||||
|
if (!isset($_GET['cmd']))
|
||||||
|
die (errorMsgBlock(3002));
|
||||||
|
|
||||||
|
set_error_handler('err_callback');
|
||||||
|
session_start();
|
||||||
|
// For error handling, buffer all output
|
||||||
|
ob_start('ob_callback_r2login');
|
||||||
|
|
||||||
|
$submittedLang = isset($_GET['lg']) ? $_GET['lg'] : 'unknown';
|
||||||
|
$submittedLang = addslashes(substr($submittedLang, 0, 10));
|
||||||
|
$cmd = isset($_GET['cmd'])?addslashes(substr($_GET['cmd'], 0, 7)):'';
|
||||||
|
$login = isset($_GET['login'])?addslashes(substr($_GET['login'], 0, 20)):'';
|
||||||
|
$password = isset($_GET['password'])?$_GET['password']:'';
|
||||||
|
$clientApplication = isset($_GET['clientApplication'])?addslashes(substr($_GET['clientApplication'], 0, 20)):'';
|
||||||
|
|
||||||
|
// Inits
|
||||||
|
$RingDb = new LoginDB($DBHost, $RingDBUserName, $RingDBPassword, $DBName);
|
||||||
|
$User = new RingUser($RingDb, $login, $password, $clientApplication, $submittedLang);
|
||||||
|
|
||||||
|
switch($cmd) {
|
||||||
|
case 'ask':
|
||||||
|
// client ask for a login salt
|
||||||
|
$User->askSalt();
|
||||||
|
die();
|
||||||
|
|
||||||
|
case 'login':
|
||||||
|
// client sent is login info
|
||||||
|
$ServerDomain = new ServerDomain($RingDb, $clientApplication);
|
||||||
|
if ($User->checkValidity($password, $ServerDomain)) {
|
||||||
|
|
||||||
|
if ($AutoCreateRingInfo)
|
||||||
|
$User->createRingInfo($ServerDomain);
|
||||||
|
|
||||||
|
$LSaddr = explode(":", $ServerDomain->domainInfo['login_address']);
|
||||||
|
// ask for a session cookie to the login service
|
||||||
|
$Login = new LoginCb();
|
||||||
|
$Login->init($RingDb, $ServerDomain);
|
||||||
|
|
||||||
|
$res = "";
|
||||||
|
$Login->connect($LSaddr[0], $LSaddr[1], $res);
|
||||||
|
$Login->login($User->uid, $_SERVER['REMOTE_ADDR'], $ServerDomain->id);
|
||||||
|
|
||||||
|
if (!$Login->waitCallback())
|
||||||
|
die(errorMsgBlock(3003));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue