diff options
author | Wim <wim@42.be> | 2019-02-16 17:24:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-16 17:24:04 +0100 |
commit | 312369586925e0419271df7466e9b40756738f89 (patch) | |
tree | 247b181b64cd589afa3ab865058f47d26db662ea /vendor/github.com/lrstanley/girc/commands.go | |
parent | 777af73e2bafc0b2c6e1d1eaa554106efec36a70 (diff) | |
download | matterbridge-msglm-312369586925e0419271df7466e9b40756738f89.tar.gz matterbridge-msglm-312369586925e0419271df7466e9b40756738f89.tar.bz2 matterbridge-msglm-312369586925e0419271df7466e9b40756738f89.zip |
Upgrade to latest girc version (irc) (#718)
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}}) |