public bool HandleMessage(ClientWrapper client, DataBuffer buffer) { string raw = buffer.ReadString(); string channel = raw.Split('|')[0]; string command = raw.Split('|')[1]; foreach (var msg in Messages) { if (msg.Key == channel) { if (msg.Value.Command == command) { msg.Value.HandleData(client, buffer); } return true; } } return false; }
public override void HandleData(ClientWrapper client, DataBuffer buffer) { string c = buffer.ReadString(); ConsoleFunctions.WriteInfoLine(client.Player.Username + "'s client: " + c); }