From a0192f87b58a139d8ae23dc10ac5da7223714812 Mon Sep 17 00:00:00 2001 From: www-data Date: Wed, 9 Sep 2020 12:34:25 -0400 Subject: [PATCH] add motd generator --- motd/index.php | 32 ++++++++++++++++++++++++++++++++ stats/index.php | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 motd/index.php diff --git a/motd/index.php b/motd/index.php new file mode 100644 index 0000000..43333e4 --- /dev/null +++ b/motd/index.php @@ -0,0 +1,32 @@ + ['bindto' => '0:0']])))->members; +foreach ($members as $member) { + echo " - " . str_pad($member->name, 17) . "~> " . $member->channel . "\n"; +} + +echo "\n"; +echo "the main lobby channel is #meta. check /list for the other channels\n"; +echo "check out https://tilde.chat/stats/ for more channel info\n"; +echo "/join #helpdesk if you need assistance\n"; + +echo "\n"; +echo "check out #tilderadio for our internet radio station!\n"; + +echo "\n"; +echo "please see our etiquette guidelines: https://tilde.chat/wiki/etiquette\n"; +echo "\n"; +echo " ~~ be execellent to each other ~~"; diff --git a/stats/index.php b/stats/index.php index 7f7b9f6..d79af8a 100644 --- a/stats/index.php +++ b/stats/index.php @@ -2,7 +2,7 @@ $title="stats page"; $desc="stats about tilde.chat and its channels"; $stats = json_decode(file_get_contents("../stats.json")); -$members = json_decode(file_get_contents("https://tildeverse.org/members.json"))->members; +$members = json_decode(file_get_contents("https://tildeverse.org/members.json", false, stream_context_create(['socket' => ['bindto' => '0:0']])))->members; include __DIR__."/../header.php"; ?>

channels