From 58d0b1a89c461467c9ea6229f9a6b3d5ed573da5 Mon Sep 17 00:00:00 2001 From: Simponic Date: Sat, 31 Dec 2022 02:29:38 -0700 Subject: A simple stalling TUI! Also, ensure sessions are counted correctly. Next up, some way of pub-sub across multiple nodes --- lib/chessh/ssh/daemon.ex | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'lib/chessh/ssh/daemon.ex') diff --git a/lib/chessh/ssh/daemon.ex b/lib/chessh/ssh/daemon.ex index b341833..24ad259 100644 --- a/lib/chessh/ssh/daemon.ex +++ b/lib/chessh/ssh/daemon.ex @@ -61,7 +61,7 @@ defmodule Chessh.SSH.Daemon do system_dir: key_dir, pwdfun: &pwd_authenticate/4, key_cb: Chessh.SSH.ServerKey, - ssh_cli: {Chessh.SSH.Cli, []}, + ssh_cli: {Chessh.SSH.Tui, []}, # connectfun: &on_connect/3, disconnectfun: &on_disconnect/1, id_string: :random, @@ -82,23 +82,6 @@ defmodule Chessh.SSH.Daemon do def handle_info(_, state), do: {:noreply, state} - # defp on_connect(username, _inet, _method) do - # Logger.debug("#{inspect(self())} connected and is authenticated as #{username}") - # - # case Repo.get_by(Player, username: String.Chars.to_string(username)) do - # nil -> - # nil - # - # player -> - # Repo.insert(%PlayerSession{ - # login: DateTime.utc_now(), - # node_id: System.fetch_env!("NODE_ID"), - # player: player, - # process: pid_to_str(self()) - # }) - # end - # end - defp on_disconnect(_reason) do Logger.debug("#{inspect(self())} disconnected") -- cgit v1.2.3-70-g09d2