summaryrefslogtreecommitdiff
path: root/lib/irc/user_track.ex
diff options
context:
space:
mode:
authorhref <href@random.sh>2020-04-17 15:53:14 +0200
committerhref <href@random.sh>2020-04-17 15:53:14 +0200
commit919725a6941830ce82c835ed3288c1722ddd8c9f (patch)
tree49a95b0ce716a24c7e056036d3353ceca1debe4a /lib/irc/user_track.ex
parentwelp (diff)
bleh
Diffstat (limited to 'lib/irc/user_track.ex')
-rw-r--r--lib/irc/user_track.ex6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/irc/user_track.ex b/lib/irc/user_track.ex
index 2614d98..02d5752 100644
--- a/lib/irc/user_track.ex
+++ b/lib/irc/user_track.ex
@@ -85,6 +85,12 @@ defmodule IRC.UserTrack do
end
end
+ def channel(channel) do
+ Enum.filter(to_list(), fn({_, nick, _, _, _, _, channels}) ->
+ Map.get(channels, channel)
+ end)
+ end
+
def joined(c, s), do: joined(c,s,[])
def joined(channel, sender=%{nick: nick, user: uname, host: host}, privileges) do