diff options
Diffstat (limited to '')
-rw-r--r-- | lib/irc/account.ex | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/irc/account.ex b/lib/irc/account.ex index 28b5141..beb8daa 100644 --- a/lib/irc/account.ex +++ b/lib/irc/account.ex @@ -236,6 +236,12 @@ defmodule IRC.Account do if make_default, do: new_account(user), else: nil end + def new_account(nick) do + id = EntropyString.large_id() + :dets.insert(file("db"), {id, nick, EntropyString.token()}) + get(id) + end + defp new_account(%{nick: nick, network: server}) do id = EntropyString.large_id() :dets.insert(file("db"), {id, nick, EntropyString.token()}) |