diff options
Diffstat (limited to 'rooms.go')
-rw-r--r-- | rooms.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -40,6 +40,13 @@ func (r *Room) Broadcast() { } } +func (r *Room) ListBuddies() (buddies []string) { + for nick := range r.Buddies { + buddies = append(buddies, nick) + } + return +} + var rooms = make(map[string]Room) func Join(room, nick string) (*Buddy, *Room, error) { |