Nexgen Server Controller

Discussions about Servers
Post Reply
Man_With_No_Body
Novice
Posts: 29
Joined: Sun Feb 06, 2022 2:16 pm

Re: Nexgen Server Controller

Post by Man_With_No_Body »

Barbie wrote: Mon Mar 28, 2022 10:05 am Is still development done with Nexgen? There is a small issue with the colourization of player names in chat: if the name of a player appears in a chat message it is highlighted regardless of the context.

As far I could said , because present of the player with specific nick
(1 or 3 characters long).......“k"...."ice" ...."Boo" ...."por"
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Nexgen Server Controller

Post by Barbie »

Man_With_No_Body wrote: Mon Mar 28, 2022 11:41 pm As far I could said , because present of the player with specific nick
(1 or 3 characters long).......“k"...."ice" ...."Boo" ...."por"
According to the code that should happen with ALL player names. The shorter the name the higher the probability that the name is part of any string. (Did you know that the Bible is contained in π?)
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
Ubir4
Adept
Posts: 316
Joined: Fri May 10, 2019 6:15 am

Re: Nexgen Server Controller

Post by Ubir4 »

Barbie wrote: Mon Mar 28, 2022 10:05 am Is still development done with Nexgen? There is a small issue with the colourization of player names in chat: if the name of a player appears in a chat message it is highlighted regardless of the context.
I see that if I had the condition that the nickname be between spaces, it would reduce mistakes. Now, to know how to differentiate, for example a nick about if you were talking about the ICE player or the "ice", it's really difficult. the letters are easier if for example the nickname K if you put the rule of spaces on both sides will not be marked in a shocK.

If the text has nicks marked then I think it's almost unlikely that this won't happen sometimes.

But there must be a better way to solve it. :highfive:

I hope they can fix it for you to be satisfied Barbie. (I myself, if something doesn't go well in UT, I'm very sad until it's resolved... due to the great appreciation for the game).
Buggie
Godlike
Posts: 2733
Joined: Sat Mar 21, 2020 5:32 am

Re: Nexgen Server Controller

Post by Buggie »

Blindly search player name as substring is common mistake. Proper solution - ensure char before and char after not [A-Za-z0-9_] or no such char (start or end of string).
User avatar
Sp0ngeb0b
Adept
Posts: 376
Joined: Wed Feb 13, 2008 9:16 pm
Location: Cologne
Contact:

Re: Nexgen Server Controller

Post by Sp0ngeb0b »

Highlighting the names regardless of the presence of whitespaces around them was intentional I believe. This does not restrict mutators/mods to follow a specific pattern when writing player names and e.g. allows for usage in possessive case ('s) or any other form languages may provide (language localization was part of Nexgen's original design). I guess this was a tradeoff where flexibility was prefered over possible miscolorings. Unfortunately, there is no other way to detect player names in messages, as you have to work with the bare string. From my experience, these miscoloring occur almost exclusively where players use a very short name and/or generic name. Especially the former are not really desired names you want players to have anyway, so you might want to consider preventing such short names with an additional mutator or something similar I guess.
Barbie wrote: Mon Mar 28, 2022 10:05 am Is still development done with Nexgen?
Unfortunately, I've left UT at this point so don't expect the development to continue soon from my side. Since I've ported all the things over to GitHub, things can be picked up by others at any time if they like :)
Website, Forum & UTStats

Image
******************************************************************************
Nexgen Server Controller || My plugins & mods on GitHub
******************************************************************************
Letylove49
Adept
Posts: 277
Joined: Tue Feb 28, 2012 7:47 pm
Location: suisse
Contact:

Re: Nexgen Server Controller

Post by Letylove49 »

Sp0ngeb0b wrote: Tue Mar 29, 2022 7:10 pm Highlighting the names regardless of the presence of whitespaces around them was intentional I believe. This does not restrict mutators/mods to follow a specific pattern when writing player names and e.g. allows for usage in possessive case ('s) or any other form languages may provide (language localization was part of Nexgen's original design). I guess this was a tradeoff where flexibility was prefered over possible miscolorings. Unfortunately, there is no other way to detect player names in messages, as you have to work with the bare string. From my experience, these miscoloring occur almost exclusively where players use a very short name and/or generic name. Especially the former are not really desired names you want players to have anyway, so you might want to consider preventing such short names with an additional mutator or something similar I guess.
Barbie wrote: Mon Mar 28, 2022 10:05 am Is still development done with Nexgen?
Unfortunately, I've left UT at this point so don't expect the development to continue soon from my side. Since I've ported all the things over to GitHub, things can be picked up by others at any time if they like :)
Thank you for all your work for Nexgen.
Are we allowed to make modifican to your plugin ?
i have noticied that NexgenABM need a fix because the admin name is not displayed when a player banned try to join the game.
Image



Letylove49 aka Alicia
Buggie
Godlike
Posts: 2733
Joined: Sat Mar 21, 2020 5:32 am

Re: Nexgen Server Controller

Post by Buggie »

Sp0ngeb0b wrote: Tue Mar 29, 2022 7:10 pm Highlighting the names regardless of the presence of whitespaces around them was intentional I believe. This does not restrict mutators/mods to follow a specific pattern when writing player names and e.g. allows for usage in possessive case ('s) or any other form languages may provide (language localization was part of Nexgen's original design). I guess this was a tradeoff where flexibility was prefered over possible miscolorings. Unfortunately, there is no other way to detect player names in messages, as you have to work with the bare string. From my experience, these miscoloring occur almost exclusively where players use a very short name and/or generic name. Especially the former are not really desired names you want players to have anyway, so you might want to consider preventing such short names with an additional mutator or something similar I guess.
Not need whitespaces. Just ensure it is "word boundary" in terms of regex. It fit for cut almost all false positioves.

Automatically merged

If someone make full list of requested changes (mostly fixes or smal improvement, not total conversions) Then i can look into it on free time and built something like 112M version.

Automatically merged

Letylove49 wrote: Unofficial release by Letylove49
Nexgen112N - Contains slight modifications of the core Nexgen controller package. Note that this requires different plugin packages!
Is sources of your changes for 112N somewhere availaible?
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Nexgen Server Controller

Post by Barbie »

Buggie wrote: Sat Apr 09, 2022 7:45 pm if someone make full list of requested changes (mostly fixes or smal improvement, not total conversions) Then i can look into it
ucc.init.log wrote:NexgenController MH-DSFoxtrotV0.NexgenController0 (Function Nexgen112N.NexgenController.MutatorBroadcastMessage:04FC) Accessed None 'P'
Probably reason: variable "P" is used in line 95 without initialisation:
Spoiler

Code: Select all

/***************************************************************************************************
 *
 *  $DESCRIPTION  Hooked into the message mutator chain so commands can be detected. This function
 *                is called if a message is send to player. Spectators that use say (not teamsay)
 *                seem to be calling this function instead of mutatorTeamMessage.
 *  $PARAM        sender    The actor that has send the message.
 *  $PARAM        receiver  Pawn receiving the message.
 *  $PARAM        msg       The message that is to be send.
 *  $PARAM        bBeep     Whether or not to make a beep sound once received.
 *  $PARAM        type      Type of the message that is to be send.
 *  $RETURN       True if the message should be send, false if it should be suppressed.
 *  $OVERRIDE
 *
 **************************************************************************************************/
function bool mutatorBroadcastMessage(Actor sender, Pawn receiver, out coerce string msg,
                                      optional bool bBeep, out optional name type) {
	local PlayerReplicationInfo senderPRI;
	local bool bIsCommand;
	local NexgenClient client;
	local bool bIsSpecMessage;
	local int index;
	local PlayerPawn P;
	local NexgenClientCore rpci;
	local string temp1, temp2;
	local bool bSend;

	// Suppress default player join / leave messages.
	if (sender == level.game && right(msg, len(level.game.leftMessage)) ~= level.game.leftMessage ||
	    sender == level.game && right(msg, len(level.game.enteredMessage)) ~= level.game.enteredMessage) {
		return false;
	}

	// Get sender player replication info.
	if (sender != none && sender.isA('Pawn')) {
		senderPRI = Pawn(sender).playerReplicationInfo;
	}

	// Check if we're dealing with a spectator chat message.
	bIsSpecMessage = senderPRI != none && sender.isA('Spectator') &&
	                 left(msg, len(senderPRI.playerName) + 1) ~= (senderPRI.playerName $ ":");

	    // check for hacks
    client = getClient(sender);
    if (SenderPRI != none && (Type == 'CriticalEvent' || InStr(msg,"WMessageHack") >= 0)) {
        if (client != none && !client.hasRight(client.R_Moderate) && (!isBanned(client, temp1, temp2, senderPri.playerName))) {
		   rpci = NexgenClientCore(client.getController(class'NexgenClientCore'.default.ctrlID));
    	   serverAutoBanPlayer(client.playerNum, client.playerName, client.sConf.BP_Forever, 0, "****WMessageHack Detected****");
    	   return false;
        }
    }



	// Check for commands.
	if (bIsSpecMessage && sender == receiver) {
		bIsCommand = handleMsgCommand(PlayerPawn(sender), mid(msg, len(senderPRI.playerName) + 1));
	}

	// Check if spectator is muted.
	if (bIsSpecMessage) {
		client = getClient(sender);
        // check if the message is from a non initialised client, and not the IRC bot, stops banned players spamming
	    if( client == none && !sender.IsA('MessagingSpectator') && Pawn(sender).PlayerReplicationInfo.PlayerName != "player")
            return false;

		if (client != none && client.isMuted() ||
		    sConf.matchModeActivated && sConf.muteSpectatorsDuringMatch &&
		    gInf.gameState == gInf.GS_Playing &&
		    !client.hasRight(client.R_MatchAdmin) && !client.hasRight(client.R_Moderate)) {
			// Spectator is muted, block the message.
			if (sender == receiver) {
				if (bIsCommand) {
					return true;
				} else {
					client.showMsg(lng.mutedReminderMsg);
				}
			}
			return false;
		}
	}

	// Write message to the log.
	if (bIsSpecMessage && sender == receiver) {
		nscLog(msg, LT_Say);
	} else if (!bIsSpecMessage && receiver != none && receiver.nextPawn == none) {
		if (senderPRI == none) {
			nscLog(msg, LT_Message);
		} else {
			nscLog(senderPRI.playerName $ ": " $ msg, LT_Message);
		}
	}

	if (sender != none && sender.isA('Pawn')) {
        if ((bBeep) && (!bIsSpecMessage))
           P.PlayBeepSound ();
	}

	// Notify plugins.
	while (index < arrayCount(plugins) && plugins[index] != none) {
		bSend = plugins[index].mutatorBroadcastMessage(sender, receiver, msg, bBeep, type);
		if (!bSend) return false;
		index++;
	}

	// Allow other message mutators to do their job.
    if (nextMessageMutator != none) {
        return nextMessageMutator.mutatorBroadcastMessage(sender, receiver, msg, bBeep, type);
    } else {
        return true;
    }
}
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Nexgen Server Controller

Post by sektor2111 »

Or it should be Sender.PlayBeepSound() and adding a sanity check like:

Code: Select all

	if ( Sender != None && Sender.bIsPawn )
	{
		Sender.Foo(); Sender.Foo1();
	}
//	else
//		return False;
With other words regarding to what Barbie said, variable P is called but never assigned... moooooo.
User avatar
esnesi
Godlike
Posts: 1018
Joined: Mon Aug 31, 2015 12:58 pm
Personal rank: Dialed in.

Re: Nexgen Server Controller

Post by esnesi »

UTChat it's HUD gives the same issue;
viewtopic.php?f=7&t=14356

I assume it's 469 related?
As i never saw this behaviour before or back on 451srv.
Buggie
Godlike
Posts: 2733
Joined: Sat Mar 21, 2020 5:32 am

Re: Nexgen Server Controller

Post by Buggie »

esnesi wrote: Sun Apr 10, 2022 9:42 am UTChat it's HUD gives the same issue;
viewtopic.php?f=7&t=14356
What issue? Please be very specific.
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Nexgen Server Controller

Post by Barbie »

One more detected (I think it belongs to Nexgen):
UnrealTournament.log wrote:ScriptWarning: NexgenRCPUserAccounts Transient.NexgenRCPUserAccounts0 (Function Nexgen112N.NexgenRCPUserAccounts.Notify:02A4) Accessed None 'SelectedItem'
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Buggie
Godlike
Posts: 2733
Joined: Sat Mar 21, 2020 5:32 am

Re: Nexgen Server Controller

Post by Buggie »

Spectate SkaarjTrooper:
ScriptWarning: NXPHUD MH-XV-LostInTimeV0_4.NXPHUD0 (Function NexgenPlus100N.NXPHUD.PreRender:0079) Accessed None 'PlayerReplicationInfo'
User avatar
esnesi
Godlike
Posts: 1018
Joined: Mon Aug 31, 2015 12:58 pm
Personal rank: Dialed in.

Re: Nexgen Server Controller

Post by esnesi »

Buggie wrote: Sun Apr 10, 2022 12:43 pm
esnesi wrote: Sun Apr 10, 2022 9:42 am UTChat it's HUD gives the same issue;
viewtopic.php?f=7&t=14356
What issue? Please be very specific.
The issue that brought this topic back to life.
viewtopic.php?f=33&t=13841&start=60#p135108
Buggie
Godlike
Posts: 2733
Joined: Sat Mar 21, 2020 5:32 am

Re: Nexgen Server Controller

Post by Buggie »

Buggie wrote: Tue Mar 29, 2022 5:13 pm Blindly search player name as substring is common mistake. Proper solution - ensure char before and char after not [A-Za-z0-9_] or no such char (start or end of string).
Post Reply