i hate auth grr
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
// -Y // 32-byte private server key (you should maybe include that from another config file and remove it from the server after startup)
|
||||
// -m // masterserver URL (no parameter uses default URL), if not set, the server will be LAN-only
|
||||
|
||||
-Y AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA // this default value is a security risk so please define your own private server key (!!)
|
||||
// No private server key (-Y) set: the server runs LAN-only without any key or auth setup.
|
||||
|
||||
// the switches o, n, n1 and n2 support coloring and character escaping; 'o' also supports escaped newlines
|
||||
// the available colors are: 0: green, 1: blue, 2: yellow, 3: red, 4: gray, 5: white, 6: dark brown, 7: dark red
|
||||
|
||||
@@ -57,6 +57,12 @@ if [ "$1" = "--outputbinarypath" ]; then
|
||||
echo "${BINARYPATH}"
|
||||
exit 0
|
||||
elif [ -x "${BINARYPATH}" ]; then
|
||||
# Kill any leftover server instances from previous runs, so the ports are free.
|
||||
# (anchored on "/<binary> " so we can never match our own command line)
|
||||
if command -v pkill >/dev/null 2>&1; then
|
||||
pkill -f "(^|/)$(basename "${BINARYPATH}")( |$)" >/dev/null 2>&1 || true
|
||||
sleep 1
|
||||
fi
|
||||
cd "${CUBE_DIR}"
|
||||
exec "${BINARYPATH}" ${CUBE_OPTIONS} ${CUBE_OPTIONFILE} "$@"
|
||||
else
|
||||
|
||||
+3
-14
@@ -1204,20 +1204,9 @@ struct servercommandline
|
||||
// client: dtwhzbsave
|
||||
switch(arg[1])
|
||||
{ // todo: gjlqEJQU
|
||||
case 'Y': // private server key
|
||||
{
|
||||
bool allas = true; // a is all A's?
|
||||
loopi(strlen(a)){ if(a[i]!='A') allas = false; }
|
||||
if(allas)
|
||||
{
|
||||
printf("KEY FAILURE: you provided the (inacceptable) example private key.\nKEY FAILURE: generate your own - read: https://assault.cubers.net/docs/server.html\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
ssk = a;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'Y': // private server key (optional, only needed to register with the masterserver)
|
||||
ssk = a;
|
||||
break;
|
||||
case '-':
|
||||
if(!strncmp(arg, "--masterport=", 13))
|
||||
{
|
||||
|
||||
@@ -364,7 +364,6 @@ void servermsinit(bool listen)
|
||||
if(!usemaster){
|
||||
mlog(ACLOG_INFO, "server is LAN-only - without connection to masterserver");
|
||||
if(listen){
|
||||
if(!scl.ssk) mlog(ACLOG_INFO, "ACTION REQUIRED: you must provide a PRIVATE SERVER KEY via the '-Y' command line argument");
|
||||
if(!scl.master) mlog(ACLOG_INFO, "LAN-only because no master is given");
|
||||
if(scl.maxclients>MAXCLIENTSONMASTER) mlog(ACLOG_INFO, "LAN-only because too many clients for master");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user