From ebffb995c6581724b0b6760bf0c68f0f9d0c4160 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Thu, 12 Dec 2024 06:44:47 +0800 Subject: Use uint32 for SIDs, uint64 for CIDs --- msg.go | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) (limited to 'msg.go') diff --git a/msg.go b/msg.go index 98ebc14..305add9 100644 --- a/msg.go +++ b/msg.go @@ -13,7 +13,7 @@ type RMsg struct { type Sourceable interface { ClientSource() string - ServerSource() string + ServerSource() uint64 } type SMsg struct { @@ -48,27 +48,7 @@ func (msg *SMsg) ClientSerialize() (final string) { } func (msg *SMsg) ServerSerialize() (final string) { - if len(msg.Tags) != 0 { - final = "@" - for k, v := range msg.Tags { - // TODO: Tag values must be escaped - final += k + "=" + v + ";" - } - final += " " - } - if msg.Source != nil { - final += ":" + msg.Source.ServerSource() + " " - } - final += msg.Command + " " - - if len(msg.Params) > 0 { - for i := 0; i < len(msg.Params)-1; i++ { - final += msg.Params[i] + " " - } - final += ":" + msg.Params[len(msg.Params)-1] - } - final += "\n" - return + panic(panicNotImplemented) } func MakeMsg(source Sourceable, command string, params ...string) (msg SMsg) { -- cgit v1.2.3