shazow / ssh-chat

Chat over SSH.
https://shazow.net/posts/ssh-how-does-it-even/
MIT License
5.59k stars 408 forks source link

bot: Skip motd on connect #413

Closed shazow closed 2 years ago

shazow commented 2 years ago

Bots don't need to see the motd.

Reproduce:

$ TERM=bot ssh ssh.chat
<motd here>
sleibrock commented 2 years ago

Issue is located here.

https://github.com/shazow/ssh-chat/blob/621ae1b0d3df6297c97f05588f7fa5ca92131a95/host.go#L135

Could include a condition to check the theme, something like if motd != "" && !apiMode.

shazow commented 2 years ago

Yar that looks right.