mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-07-04 05:27:44 +00:00
Update dependencies (#1521)
This commit is contained in:
3
vendor/github.com/lrstanley/girc/commands.go
generated
vendored
3
vendor/github.com/lrstanley/girc/commands.go
generated
vendored
@ -5,6 +5,7 @@
|
||||
package girc
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
"errors"
|
||||
"fmt"
|
||||
)
|
||||
@ -356,7 +357,7 @@ func (cmd *Commands) List(channels ...string) {
|
||||
// Whowas sends a WHOWAS query to the server. amount is the amount of results
|
||||
// you want back.
|
||||
func (cmd *Commands) Whowas(user string, amount int) {
|
||||
cmd.c.Send(&Event{Command: WHOWAS, Params: []string{user, string(amount)}})
|
||||
cmd.c.Send(&Event{Command: WHOWAS, Params: []string{user, strconv.Itoa(amount)}})
|
||||
}
|
||||
|
||||
// Monitor sends a MONITOR query to the server. The results of the query
|
||||
|
15
vendor/github.com/lrstanley/girc/event.go
generated
vendored
15
vendor/github.com/lrstanley/girc/event.go
generated
vendored
@ -248,7 +248,7 @@ func (e *Event) Len() (length int) {
|
||||
|
||||
// If param contains a space or it's empty, it's trailing, so it should be
|
||||
// prefixed with a colon (:).
|
||||
if i == len(e.Params)-1 && (strings.Contains(e.Params[i], " ") || e.Params[i] == "") {
|
||||
if i == len(e.Params)-1 && (strings.Contains(e.Params[i], " ") || strings.HasPrefix(e.Params[i], ":") || e.Params[i] == "") {
|
||||
length++
|
||||
}
|
||||
}
|
||||
@ -284,9 +284,8 @@ func (e *Event) Bytes() []byte {
|
||||
// Space separated list of arguments.
|
||||
if len(e.Params) > 0 {
|
||||
// buffer.WriteByte(eventSpace)
|
||||
|
||||
for i := 0; i < len(e.Params); i++ {
|
||||
if i == len(e.Params)-1 && (strings.Contains(e.Params[i], " ") || e.Params[i] == "") {
|
||||
if i == len(e.Params)-1 && (strings.Contains(e.Params[i], " ") || strings.HasPrefix(e.Params[i], ":") || e.Params[i] == "") {
|
||||
buffer.WriteString(string(eventSpace) + string(messagePrefix) + e.Params[i])
|
||||
continue
|
||||
}
|
||||
@ -363,7 +362,15 @@ func (e *Event) Pretty() (out string, ok bool) {
|
||||
|
||||
return fmt.Sprintf("[*] CTCP query from %s: %s%s", ctcp.Source.Name, ctcp.Command, " "+ctcp.Text), true
|
||||
}
|
||||
return fmt.Sprintf("[%s] (%s) %s", strings.Join(e.Params[0:len(e.Params)-1], ","), e.Source.Name, e.Last()), true
|
||||
|
||||
var source string
|
||||
if e.Command == PRIVMSG {
|
||||
source = fmt.Sprintf("(%s)", e.Source.Name)
|
||||
} else { // NOTICE
|
||||
source = fmt.Sprintf("--%s--", e.Source.Name)
|
||||
}
|
||||
|
||||
return fmt.Sprintf("[%s] %s %s", strings.Join(e.Params[0:len(e.Params)-1], ","), source, e.Last()), true
|
||||
}
|
||||
|
||||
if e.Command == RPL_MOTD || e.Command == RPL_MOTDSTART ||
|
||||
|
Reference in New Issue
Block a user