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 π?)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"
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.
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.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.
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
Not need whitespaces. Just ensure it is "word boundary" in terms of regex. It fit for cut almost all false positioves.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.
Automatically merged
Automatically merged
Is sources of your changes for 112N somewhere availaible?Letylove49 wrote: Unofficial release by Letylove49
Nexgen112N - Contains slight modifications of the core Nexgen controller package. Note that this requires different plugin packages!
Probably reason: variable "P" is used in line 95 without initialisation:ucc.init.log wrote:NexgenController MH-DSFoxtrotV0.NexgenController0 (Function Nexgen112N.NexgenController.MutatorBroadcastMessage:04FC) Accessed None 'P'
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;
}
}
Code: Select all
if ( Sender != None && Sender.bIsPawn )
{
Sender.Foo(); Sender.Foo1();
}
// else
// return False;
What issue? Please be very specific.esnesi wrote: ↑Sun Apr 10, 2022 9:42 am UTChat it's HUD gives the same issue;
viewtopic.php?f=7&t=14356
UnrealTournament.log wrote:ScriptWarning: NexgenRCPUserAccounts Transient.NexgenRCPUserAccounts0 (Function Nexgen112N.NexgenRCPUserAccounts.Notify:02A4) Accessed None 'SelectedItem'
The issue that brought this topic back to life.Buggie wrote: ↑Sun Apr 10, 2022 12:43 pmWhat issue? Please be very specific.esnesi wrote: ↑Sun Apr 10, 2022 9:42 am UTChat it's HUD gives the same issue;
viewtopic.php?f=7&t=14356