mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Fix custom chat tokens with : in them
This commit is contained in:
parent
db1fe40f90
commit
a0725bfe48
@ -116,11 +116,12 @@ namespace MCGalaxy {
|
||||
}
|
||||
|
||||
string[] lines = tokensFile.GetText();
|
||||
string[] parts = new string[2];
|
||||
char[] colon = new char[] {':'};
|
||||
|
||||
foreach (string line in lines) {
|
||||
if (line.StartsWith("//")) continue;
|
||||
line.FixedSplit(parts, ':');
|
||||
if (parts[1] == null) continue; // not a proper line
|
||||
string[] parts = line.Split(colon, 2);
|
||||
if (parts.Length == 1) continue; // not a proper line
|
||||
|
||||
string key = parts[0].Trim(), value = parts[1].Trim();
|
||||
if (key.Length == 0) continue;
|
||||
|
@ -155,7 +155,7 @@ namespace MCGalaxy.Network {
|
||||
// DoSendAsync returns false if SendAsync completed sync
|
||||
// If that happens, SendCallback isn't called so we need to send data here instead
|
||||
if (s.DoSendAsync(s.sendQueue.Dequeue())) return;
|
||||
|
||||
|
||||
if (s.player.disconnected) s.sendQueue.Clear();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user