1 defmodule Pleroma.BBS do
6 system_dir: 'ssh_keys',
7 auth_method_kb_interactive_data: fn (_, user, _) -> {
8 'Welcome to Pleroma BBS',
13 auth_methods: 'keyboard-interactive,password',
14 pwdfun: fn(user, password) -> true end,
15 shell: &start_prompt/1
17 :ssh.daemon(13121, options)
20 def start_prompt(user) do
21 spawn(__MODULE__, :prompt, [user])
25 IO.puts("Hey #{user}.\n")
26 IO.puts("Here's your timeline:\n")
28 user = Pleroma.User.get_cached_by_nickname(to_string(user))
29 Pleroma.Web.TwitterAPI.TwitterAPI.fetch_friend_statuses(user)
30 |> Enum.each(fn (status) ->
31 IO.puts("#{status["user"]["name"]} (#{status["user"]["screen_name"]}): #{status["text"]}")