mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Allow spaces at start of chat messages
This commit is contained in:
parent
35ea08915a
commit
c60c3e14e9
|
@ -294,6 +294,14 @@ class NetString(NetVariable):
|
|||
def emit_pack(self):
|
||||
return ["pPacker->AddString(%s, -1);" % self.name]
|
||||
|
||||
class NetStringHalfStrict(NetVariable):
|
||||
def emit_declaration(self):
|
||||
return ["const char *%s;"%self.name]
|
||||
def emit_unpack(self):
|
||||
return ["pMsg->%s = pUnpacker->GetString(CUnpacker::SANITIZE_CC);" % self.name]
|
||||
def emit_pack(self):
|
||||
return ["pPacker->AddString(%s, -1);" % self.name]
|
||||
|
||||
class NetStringStrict(NetVariable):
|
||||
def emit_declaration(self):
|
||||
return ["const char *%s;"%self.name]
|
||||
|
|
|
@ -231,7 +231,7 @@ Messages = [
|
|||
NetMessage("Sv_Chat", [
|
||||
NetIntRange("m_Team", 'TEAM_SPECTATORS', 'TEAM_BLUE'),
|
||||
NetIntRange("m_ClientID", -1, 'MAX_CLIENTS-1'),
|
||||
NetStringStrict("m_pMessage"),
|
||||
NetStringHalfStrict("m_pMessage"),
|
||||
]),
|
||||
|
||||
NetMessage("Sv_KillMsg", [
|
||||
|
@ -294,7 +294,7 @@ Messages = [
|
|||
### Client messages
|
||||
NetMessage("Cl_Say", [
|
||||
NetBool("m_Team"),
|
||||
NetStringStrict("m_pMessage"),
|
||||
NetStringHalfStrict("m_pMessage"),
|
||||
]),
|
||||
|
||||
NetMessage("Cl_SetTeam", [
|
||||
|
|
Loading…
Reference in a new issue