diff options
Diffstat (limited to 'lib/plugins/preums.ex')
-rw-r--r-- | lib/plugins/preums.ex | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/plugins/preums.ex b/lib/plugins/preums.ex index f7738ad..c55248d 100644 --- a/lib/plugins/preums.ex +++ b/lib/plugins/preums.ex @@ -95,10 +95,10 @@ defmodule Nola.Plugins.Preums do case key do {{net, {bork,chan}}, date} -> :dets.delete(table, key) - nick = if IRC.Account.get(nick) do + nick = if Nola.Account.get(nick) do nick else - if acct = IRC.Account.find_always_by_nick(net, nil, nick) do + if acct = Nola.Account.find_always_by_nick(net, nil, nick) do acct.id else nick @@ -108,8 +108,8 @@ defmodule Nola.Plugins.Preums do {{_net, nil}, _} -> :dets.delete(table, key) {{net, chan}, date} -> - if !IRC.Account.get(nick) do - if acct = IRC.Account.find_always_by_nick(net, chan, nick) do + if !Nola.Account.get(nick) do + if acct = Nola.Account.find_always_by_nick(net, chan, nick) do :dets.delete(table, key) :dets.insert(table, { { {net,chan}, date }, acct.id, now, perfect, text}) end @@ -142,7 +142,7 @@ defmodule Nola.Plugins.Preums do if item do {_, account_id, date, _perfect, text} = item h = "#{date.hour}:#{date.minute}:#{date.second}" - account = IRC.Account.get(account_id) + account = Nola.Account.get(account_id) user = IRC.UserTrack.find_by_account(m.network, account) nick = if(user, do: user.nick, else: account.name) m.replyfun.("preums: #{nick} à #{h}: “#{text}”") @@ -156,7 +156,7 @@ defmodule Nola.Plugins.Preums do state = handle_preums(m, state) top = topnicks(state.dets, channel, sort_by: :score) |> Enum.map(fn({account_id, {count, score}}) -> - account = IRC.Account.get(account_id) + account = Nola.Account.get(account_id) user = IRC.UserTrack.find_by_account(m.network, account) nick = if(user, do: user.nick, else: account.name) "#{nick}: #{score} (#{count})" |