forked from External/ergo
import changes
This commit is contained in:
parent
30f47a9b22
commit
ca62b268b0
16 changed files with 272 additions and 34 deletions
|
|
@ -16,6 +16,7 @@ func IsRestrictedCTCPMessage(message string) bool {
|
|||
|
||||
type MessagePair struct {
|
||||
Message string
|
||||
Tags map[string]string
|
||||
Concat bool // should be relayed with the multiline-concat tag
|
||||
}
|
||||
|
||||
|
|
@ -37,19 +38,20 @@ type SplitMessage struct {
|
|||
|
||||
func MakeMessage(original string) (result SplitMessage) {
|
||||
result.Message = original
|
||||
result.Msgid = GenerateSecretToken()
|
||||
result.Msgid = GenerateMessageIdStr()
|
||||
result.SetTime()
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (sm *SplitMessage) Append(message string, concat bool) {
|
||||
func (sm *SplitMessage) Append(message string, concat bool, tags map[string]string) {
|
||||
if sm.Msgid == "" {
|
||||
sm.Msgid = GenerateSecretToken()
|
||||
sm.Msgid = GenerateMessageIdStr()
|
||||
}
|
||||
sm.Split = append(sm.Split, MessagePair{
|
||||
Message: message,
|
||||
Concat: concat,
|
||||
Tags: tags,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue