add motd generator
continuous-integration/drone/push Build is failing Details

This commit is contained in:
www-data 2020-09-09 12:34:25 -04:00
parent 1dbab9f04b
commit a0192f87b5
2 changed files with 33 additions and 1 deletions

32
motd/index.php Normal file
View File

@ -0,0 +1,32 @@
<?php
header("Content-Type: text/plain");
$node = $_GET["node"] ?? "hub";
echo shell_exec("figlet -f slant -- " . escapeshellarg($node) . ".tilde.chat");
echo "welcome to tilde.chat\n";
echo "this is the irc network for the tildeverse (https://tildeverse.org)\n";
echo "\n";
echo "check out the appropriate channel for your tilde:\n";
echo "\n";
$members = json_decode(file_get_contents("https://tildeverse.org/members.json", false, stream_context_create(['socket' => ['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 ~~";

View File

@ -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";
?>
<h1>channels</h1>