Correct function params to accurately reflect how tags are now handled
This commit is contained in:
parent
70e4f8ab90
commit
8f4aac5afa
@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
// Msg sends a message to the given target.
|
||||
func (sc *ServerConnection) Msg(tags *map[string]string, target string, message string, escaped bool) {
|
||||
func (sc *ServerConnection) Msg(tags map[string]string, target string, message string, escaped bool) {
|
||||
if escaped {
|
||||
message = ircfmt.Unescape(message)
|
||||
}
|
||||
@ -16,7 +16,7 @@ func (sc *ServerConnection) Msg(tags *map[string]string, target string, message
|
||||
}
|
||||
|
||||
// Notice sends a notice to the given target.
|
||||
func (sc *ServerConnection) Notice(tags *map[string]string, target string, message string, escaped bool) {
|
||||
func (sc *ServerConnection) Notice(tags map[string]string, target string, message string, escaped bool) {
|
||||
if escaped {
|
||||
message = ircfmt.Unescape(message)
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ func (sc *ServerConnection) ProcessIncomingLine(line string) {
|
||||
info := eventmgr.NewInfoMap()
|
||||
info["server"] = sc
|
||||
info["direction"] = "in"
|
||||
info["tags"] = message.Tags
|
||||
info["tags"] = message.AllTags()
|
||||
info["prefix"] = message.Prefix
|
||||
info["command"] = cmd
|
||||
info["params"] = message.Params
|
||||
@ -236,7 +236,7 @@ func (sc *ServerConnection) Casefold(message string) (string, error) {
|
||||
|
||||
// Send sends an IRC message to the server. If the message cannot be converted
|
||||
// to a raw IRC line, an error is returned.
|
||||
func (sc *ServerConnection) Send(tags *map[string]string, prefix string, command string, params ...string) error {
|
||||
func (sc *ServerConnection) Send(tags map[string]string, prefix string, command string, params ...string) error {
|
||||
msg := ircmsg.MakeMessage(tags, prefix, command, params...)
|
||||
line, err := msg.Line()
|
||||
if err != nil {
|
||||
@ -253,9 +253,9 @@ func (sc *ServerConnection) Send(tags *map[string]string, prefix string, command
|
||||
|
||||
var outTags map[string]string
|
||||
if tags == nil {
|
||||
outTags = *ircmsg.MakeTags()
|
||||
outTags = map[string]string{}
|
||||
} else {
|
||||
outTags = *tags
|
||||
outTags = tags
|
||||
}
|
||||
|
||||
// dispatch real event
|
||||
|
Loading…
Reference in New Issue
Block a user