mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Fix last commit which broke login.
This commit is contained in:
parent
dd79254796
commit
9f204057a5
@ -33,12 +33,12 @@ namespace MCGalaxy {
|
|||||||
int length = p.socket.EndReceive(result);
|
int length = p.socket.EndReceive(result);
|
||||||
if (length == 0) { p.Disconnect(); return; }
|
if (length == 0) { p.Disconnect(); return; }
|
||||||
|
|
||||||
byte[] allData = new byte[p.buffer.Length + length];
|
byte[] allData = new byte[p.leftBuffer.Length + length];
|
||||||
Buffer.BlockCopy(p.buffer, 0, allData, 0, p.buffer.Length);
|
Buffer.BlockCopy(p.leftBuffer, 0, allData, 0, p.leftBuffer.Length);
|
||||||
Buffer.BlockCopy(p.tempbuffer, 0, allData, p.buffer.Length, length);
|
Buffer.BlockCopy(p.tempbuffer, 0, allData, p.leftBuffer.Length, length);
|
||||||
p.buffer = p.ProcessReceived(allData);
|
p.leftBuffer = p.ProcessReceived(allData);
|
||||||
|
|
||||||
if (p.dontmindme && p.buffer.Length == 0) {
|
if (p.dontmindme && p.leftBuffer.Length == 0) {
|
||||||
Server.s.Log("Disconnected");
|
Server.s.Log("Disconnected");
|
||||||
p.socket.Close();
|
p.socket.Close();
|
||||||
p.disconnected = true;
|
p.disconnected = true;
|
||||||
@ -299,8 +299,8 @@ namespace MCGalaxy {
|
|||||||
|
|
||||||
void SendMapMotd(bool ignoreLevelMotd) {
|
void SendMapMotd(bool ignoreLevelMotd) {
|
||||||
byte[] packet = Packet.MakeMotd(this, ignoreLevelMotd);
|
byte[] packet = Packet.MakeMotd(this, ignoreLevelMotd);
|
||||||
if (OnSendMOTD != null) OnSendMOTD(this, buffer);
|
if (OnSendMOTD != null) OnSendMOTD(this, packet);
|
||||||
SendRaw(buffer);
|
SendRaw(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendMap(Level oldLevel) { SendRawMap(oldLevel, level); }
|
public void SendMap(Level oldLevel) { SendRawMap(oldLevel, level); }
|
||||||
|
@ -75,7 +75,7 @@ namespace MCGalaxy {
|
|||||||
public string BrushName = "normal", DefaultBrushArgs = "";
|
public string BrushName = "normal", DefaultBrushArgs = "";
|
||||||
public string afkMessage;
|
public string afkMessage;
|
||||||
|
|
||||||
byte[] buffer = new byte[0];
|
byte[] leftBuffer = new byte[0];
|
||||||
byte[] tempbuffer = new byte[0xFF];
|
byte[] tempbuffer = new byte[0xFF];
|
||||||
public bool disconnected = false;
|
public bool disconnected = false;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user