summaryrefslogtreecommitdiff
path: root/lib/lsg_web/controllers/irc_controller.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lsg_web/controllers/irc_controller.ex')
-rw-r--r--lib/lsg_web/controllers/irc_controller.ex7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/lsg_web/controllers/irc_controller.ex b/lib/lsg_web/controllers/irc_controller.ex
index 32007c2..d518481 100644
--- a/lib/lsg_web/controllers/irc_controller.ex
+++ b/lib/lsg_web/controllers/irc_controller.ex
@@ -5,7 +5,7 @@ defmodule LSGWeb.IrcController do
def index(conn, params) do
network = Map.get(params, "network")
- channel = if c = Map.get(params, "channel"), do: LSGWeb.reformat_chan(c)
+ channel = if c = Map.get(params, "chan"), do: LSGWeb.reformat_chan(c)
commands = for mod <- Enum.uniq([IRC.Account.AccountPlugin] ++ IRC.Plugin.enabled()) do
if is_atom(mod) do
identifier = Module.split(mod) |> List.last |> String.replace("Plugin", "") |> Macro.underscore
@@ -15,8 +15,9 @@ defmodule LSGWeb.IrcController do
|> Enum.filter(& &1)
|> Enum.filter(fn({_, doc}) -> doc end)
members = cond do
- network -> IRC.Membership.expanded_members_or_friends(conn.assigns.account, network, channel)
- true -> IRC.Membership.of_account(conn.assigns.account)
+ network && channel -> Enum.map(IRC.UserTrack.channel(network, channel), fn(tuple) -> IRC.UserTrack.User.from_tuple(tuple) end)
+ true ->
+ IRC.Membership.of_account(conn.assigns.account)
end
render conn, "index.html", network: network, commands: commands, channel: channel, members: members
end