diff options
author | href <href@random.sh> | 2021-09-01 12:42:39 +0200 |
---|---|---|
committer | href <href@random.sh> | 2021-09-01 12:42:39 +0200 |
commit | 9d32cd0facf4538d30d7bd6b25f4c95007bdce24 (patch) | |
tree | e1ef0bd5559e8dacea9736837e8affcc3dfcd36f | |
parent | alcoolog: remove migration code (diff) |
admin.md
-rw-r--r-- | Admin.md | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -40,3 +40,28 @@ Everything is supposed to be ran inside a remote IEx console: `./bin/lsg remote` ### Declare a plugin IRC.Plugin.declare(module) + +## Account/Users + +### Get an account by ID + + IRC.Account.get(id) + +### Find account by network & nick + + IRC.Account.find_by_nick(network, nick) + +## Alcoolog + +* History: `AlcoologPlugin.user_history(id)` + + +### Remove an entry + + id = "" # Some account id + alc = LSG.IRC.AlcoologPlugin.data_state() + # 249° + elem = h |> Enum.find(fn(el) -> elem(el, 4) == 249 end) + # 249cl + elem = h |> Enum.find(fn(el) -> elem(el, 3) == 249 end) + :dets.delete_object(alc.dets, elem) |