aboutsummaryrefslogtreecommitdiff
path: root/msg.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2024-12-12 06:44:47 +0800
committerRunxi Yu <me@runxiyu.org>2024-12-12 06:44:47 +0800
commitebffb995c6581724b0b6760bf0c68f0f9d0c4160 (patch)
treeaa9f232f988130a5d8dda9fc1fbd13cf8fc187a2 /msg.go
parentCAP LS: Take version as integer (diff)
downloadmeseircd-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.go24
1 files changed, 2 insertions, 22 deletions
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) {