add box features

This commit is contained in:
Redo
2025-02-26 17:36:12 -07:00
parent cd5b46cc3b
commit dd049be341
21 changed files with 1510 additions and 339 deletions

View File

@ -17,28 +17,30 @@ package NewDuplicator_Server
//Client responded, so he has new duplicator
function serverCmdNdHandshake(%this, %version)
{
echo("serverCmdNdHandshake " @ %this.name @ " - " @ %version);
cancel(%this.ndHandshakeTimeout);
%this.ndClient = true;
%this.ndVersion = %version;
//Inform client whether he has an outdated version
switch(ndCompareVersion($ND::Version, %version))
{
case 1:
%m = "\c6Your version of the \c3New Duplicator\c6 is outdated! Some features might not work. ";
%m = %m @ "(Server Version: \c3" @ $ND::Version @ "\c6 | Your Version: \c0" @ %version @ "\c6)";
//messageClient(%this, '', %m);
case 2:
//Hide this message on long-running dedicated servers
if($Sim::Time < 86400)
{
%m = "\c6Your version of the \c3New Duplicator\c6 is newer than the server's! Ask the host to update it! ";
%m = %m @ "(Server Version: \c0" @ $ND::Version @ "\c6 | Your Version: \c3" @ %version @ "\c6)";
//messageClient(%this, '', %m);
}
}
// nobody gives a shit
//switch(ndCompareVersion($ND::Version, %version))
//{
// case 1:
// %m = "\c6Your version of the \c3New Duplicator\c6 is outdated! Some features might not work. ";
// %m = %m @ "(Server Version: \c3" @ $ND::Version @ "\c6 | Your Version: \c0" @ %version @ "\c6)";
// messageClient(%this, '', %m);
//
// case 2:
// //Hide this message on long-running dedicated servers
// if($Sim::Time < 86400)
// {
// %m = "\c6Your version of the \c3New Duplicator\c6 is newer than the server's! Ask the host to update it! ";
// %m = %m @ "(Server Version: \c0" @ $ND::Version @ "\c6 | Your Version: \c3" @ %version @ "\c6)";
// messageClient(%this, '', %m);
// }
//}
}
//Compares two version numbers (major.minor.patch)