1
0
forked from lug/matterbridge

Add Mumble support (#1245)

This commit is contained in:
Sebastian P
2020-10-01 22:50:56 +02:00
committed by GitHub
parent e7781dc79c
commit 214a6a1386
61 changed files with 9409 additions and 0 deletions

18
vendor/layeh.com/gumble/gumbleutil/channel.go generated vendored Normal file
View File

@@ -0,0 +1,18 @@
package gumbleutil
import (
"layeh.com/gumble/gumble"
)
// ChannelPath returns a slice of channel names, starting from the root channel
// to the given channel.
func ChannelPath(channel *gumble.Channel) []string {
var pieces []string
for ; channel != nil; channel = channel.Parent {
pieces = append(pieces, channel.Name)
}
for i := 0; i < (len(pieces) / 2); i++ {
pieces[len(pieces)-1-i], pieces[i] = pieces[i], pieces[len(pieces)-1-i]
}
return pieces
}