diff options
Diffstat (limited to 'vendor/github.com/lrstanley/girc/commands.go')
-rw-r--r-- | vendor/github.com/lrstanley/girc/commands.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/vendor/github.com/lrstanley/girc/commands.go b/vendor/github.com/lrstanley/girc/commands.go index 79287d52..9538cedc 100644 --- a/vendor/github.com/lrstanley/girc/commands.go +++ b/vendor/github.com/lrstanley/girc/commands.go @@ -63,7 +63,7 @@ func (cmd *Commands) Part(channels ...string) { // PartMessage leaves an IRC channel with a specified leave message. func (cmd *Commands) PartMessage(channel, message string) { - cmd.c.Send(&Event{Command: PART, Params: []string{channel}, Trailing: message, EmptyTrailing: true}) + cmd.c.Send(&Event{Command: PART, Params: []string{channel, message}}) } // SendCTCP sends a CTCP request to target. Note that this method uses @@ -105,7 +105,7 @@ func (cmd *Commands) SendCTCPReply(target, ctcpType, message string) { // Message sends a PRIVMSG to target (either channel, service, or user). func (cmd *Commands) Message(target, message string) { - cmd.c.Send(&Event{Command: PRIVMSG, Params: []string{target}, Trailing: message, EmptyTrailing: true}) + cmd.c.Send(&Event{Command: PRIVMSG, Params: []string{target, message}}) } // Messagef sends a formated PRIVMSG to target (either channel, service, or @@ -171,9 +171,8 @@ func (cmd *Commands) ReplyTof(event Event, format string, a ...interface{}) { // or user). func (cmd *Commands) Action(target, message string) { cmd.c.Send(&Event{ - Command: PRIVMSG, - Params: []string{target}, - Trailing: fmt.Sprintf("\001ACTION %s\001", message), + Command: PRIVMSG, + Params: []string{target, fmt.Sprintf("\001ACTION %s\001", message)}, }) } @@ -185,7 +184,7 @@ func (cmd *Commands) Actionf(target, format string, a ...interface{}) { // Notice sends a NOTICE to target (either channel, service, or user). func (cmd *Commands) Notice(target, message string) { - cmd.c.Send(&Event{Command: NOTICE, Params: []string{target}, Trailing: message, EmptyTrailing: true}) + cmd.c.Send(&Event{Command: NOTICE, Params: []string{target, message}}) } // Noticef sends a formated NOTICE to target (either channel, service, or @@ -221,7 +220,7 @@ func (cmd *Commands) SendRawf(format string, a ...interface{}) error { // Topic sets the topic of channel to message. Does not verify the length // of the topic. func (cmd *Commands) Topic(channel, message string) { - cmd.c.Send(&Event{Command: TOPIC, Params: []string{channel}, Trailing: message, EmptyTrailing: true}) + cmd.c.Send(&Event{Command: TOPIC, Params: []string{channel, message}}) } // Who sends a WHO query to the server, which will attempt WHOX by default. @@ -266,7 +265,7 @@ func (cmd *Commands) Oper(user, pass string) { // server. func (cmd *Commands) Kick(channel, user, reason string) { if reason != "" { - cmd.c.Send(&Event{Command: KICK, Params: []string{channel, user}, Trailing: reason, EmptyTrailing: true}) + cmd.c.Send(&Event{Command: KICK, Params: []string{channel, user, reason}}) } cmd.c.Send(&Event{Command: KICK, Params: []string{channel, user}}) |