X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=tosrvcmds.go;h=889191cc206d7213dd210650c57f035367eb4c94;hb=f53b8b3fe456d0929941073cd88ba0e4f10c9bdf;hp=491520480a9d3de7144c33932653fe0ca3274675;hpb=f967a747e4ae01fba3a6c3fd693d0e753faf3ae4;p=mt.git diff --git a/tosrvcmds.go b/tosrvcmds.go index 4915204..889191c 100644 --- a/tosrvcmds.go +++ b/tosrvcmds.go @@ -1,5 +1,7 @@ package mt +import "github.com/anon55555/mt/rudp" + type ToSrvCmd interface { Cmd toSrvCmdNo() uint16 @@ -30,18 +32,18 @@ type ToSrvInit2 struct { Lang string } -// ToSrvModChanJoin attempts to join a mod channel. -type ToSrvModChanJoin struct { +// ToSrvJoinModChan attempts to join a mod channel. +type ToSrvJoinModChan struct { Channel string } -// ToSrvModChanJoin attempts to leave a mod channel. -type ToSrvModChanLeave struct { +// ToSrvLeaveModChan attempts to leave a mod channel. +type ToSrvLeaveModChan struct { Channel string } -// ToSrvModChanJoin sends a message on a mod channel. -type ToSrvModChanMsg struct { +// ToSrvMsgModChan sends a message on a mod channel. +type ToSrvMsgModChan struct { Channel string Msg string } @@ -57,6 +59,12 @@ type ToSrvGotBlks struct { Blks [][3]int16 } +// ToSrvHaveMedia tells the server that the client has received the media. +type ToSrvHaveMedia struct { + //mt:len8 + token uint32 +} + // ToSrvDeletedBlks tells the server that the client has deleted Blks. type ToSrvDeletedBlks struct { //mt:len8 @@ -155,3 +163,9 @@ type ToSrvSRPBytesA struct { type ToSrvSRPBytesM struct { M []byte } + +type ToSrvDisco struct{} + +func (*ToSrvDisco) cmd() {} +func (*ToSrvDisco) toSrvCmdNo() uint16 { return 0xffff } +func (*ToSrvDisco) DefaultPktInfo() rudp.PktInfo { return rudp.PktInfo{} }