summaryrefslogtreecommitdiff
path: root/rooms.go
diff options
context:
space:
mode:
Diffstat (limited to 'rooms.go')
-rw-r--r--rooms.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/rooms.go b/rooms.go
index e7512ee..c732bb6 100644
--- a/rooms.go
+++ b/rooms.go
@@ -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) {