diff options
author | Runxi Yu <me@runxiyu.org> | 2024-12-12 06:44:47 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2024-12-12 06:44:47 +0800 |
commit | ebffb995c6581724b0b6760bf0c68f0f9d0c4160 (patch) | |
tree | aa9f232f988130a5d8dda9fc1fbd13cf8fc187a2 /msg.go | |
parent | CAP LS: Take version as integer (diff) | |
download | meseircd-ebffb995c6581724b0b6760bf0c68f0f9d0c4160.tar.gz meseircd-ebffb995c6581724b0b6760bf0c68f0f9d0c4160.tar.zst meseircd-ebffb995c6581724b0b6760bf0c68f0f9d0c4160.zip |
Use uint32 for SIDs, uint64 for CIDs
Diffstat (limited to 'msg.go')
-rw-r--r-- | msg.go | 24 |
1 files changed, 2 insertions, 22 deletions
@@ -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) { |