Closed ravimohan1991 closed 2 years ago
A resolution (Piglet's intuition) might result from using the URLEncode methodology with relevant scope for delimiter characters in player names. Currently the commit 917ebc0 incorporates it in UnrealScript side.
After doing some tests, I think, we have fixed the issue in commit 78d948b. We have introduced new explode method in the PHP side which allows any character once it parses that the name field is being dealt with (the cue is essentially delimiter followed by a space like so).
For clarity, I am providing the PHP new explode method
function newExplode(string $delimiter, string $string)
{
$stringToExplode = urldecode($string);
$returnArray = array();
$bIsTraversingName = False;
$bIsNameSpaceDelimiter = False;
$arrString = '';
for ($i = 0; $i < strlen($stringToExplode); $i++)
{
if($stringToExplode[$i] == $delimiter && !$bIsTraversingName)
{
if($stringToExplode[$i + 1] == ' ')
{
$bIsTraversingName = True;
$bIsNameSpaceDelimiter = True;
}
array_push($returnArray, $arrString);
$arrString = '';
}
else
{
if($stringToExplode[$i] == ' ' && $bIsNameSpaceDelimiter)
{
$bIsNameSpaceDelimiter = false;
continue;
}
$arrString = $arrString . $stringToExplode[$i];
}
}
array_push($returnArray, $arrString);
return $returnArray;
}
Piglet is quite suspicious of the scenario in which the player name itself consists of the database specific characters (for instance ':'). He gave a live example happening on the server for the player name - Sàdly:`-( (UA).
As per Piglet's observation: "The ":" in the player name is being seen by "$infoColumns = explode(':', $info);" (see here) - so it gets split out to a new column. For now I'll work around that by changing the line to "$infoColumns = explode(':', $info, 13);" to limit the number of times it will split."