Compare commits

..

2 Commits

Author SHA1 Message Date
Robert Miles 22f596ab4d Update 'gen_stats'
This was hard to mess with indents. Why, ben, why?
2018-11-06 09:56:41 -05:00
Robert Miles 87ef4d25e3 Add example blacklist file 2018-11-06 09:54:50 -05:00
25 changed files with 1242 additions and 375 deletions

View File

@ -1,26 +0,0 @@
---
kind: pipeline
type: ssh
name: deploy
server:
host:
from_secret: host
user:
from_secret: username
ssh_key:
from_secret: ssh_key
clone:
disable: true
trigger:
branch:
- master
steps:
- name: deploy
commands:
- cd /var/www/tilde.chat
- sudo -Hu www-data git pull origin master

View File

@ -1,4 +1,4 @@
# EditorConfig to make ben's editor stop defaulting to spaces
# EdeitorConfig to make ben's editor stop defaulting to spaces
root = true # yes, this is the root editorconfig for this project

1
.gitignore vendored
View File

@ -1,3 +1,2 @@
stats.json
vendor/
blacklist

View File

@ -1,7 +1,5 @@
# [tilde.chat](https://tilde.chat)
[![Build Status](https://drone.tildegit.org/api/badges/tildeverse/tilde.chat/status.svg)](https://drone.tildegit.org/tildeverse/tilde.chat)
this is the source for [tilde.chat](https://tilde.chat).
if you have any fixes/updates that you need to make, feel free to open a PR.
@ -9,26 +7,3 @@ if you have any fixes/updates that you need to make, feel free to open a PR.
[wiki](https://tilde.chat/wiki/) updates are [part of this repo](wiki/) as well.
stop by irc and say hi!
---
## deployment
1. clone the repo into your webroot
2. `composer install`
2. make sure inspircd has m_httpd.so m_httpd_stats.so loaded
3. add a local bind for stats on 8081:
`<bind address="127.0.0.1" port="8081" type="httpd">`
4. add gen_stats to a crontab for a user that can write in the webroot:
`* * * * * /var/www/tilde.chat/gen_stats`
5. nginx config for pretty urls
```
location ~* ^/wiki/(.+)$ {
try_files $uri $uri/ /wiki/index.php?page=$1;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
}
}
```

View File

@ -1,14 +1,14 @@
<?php
function get_badge($channel_name=FALSE) {
if ($channel_name==FALSE) {
return "https://img.shields.io/badge/dynamic/json.svg?url=https://tilde.chat/stats.json&label=~chat&query=$.usercount&suffix=%20online&link=https:%2F%2Ftilde.chat&link=https:%2F%2Fweb.tilde.chat&colorB=%2300cc00";
return "https://img.shields.io/badge/dynamic/json.svg?url=https://tilde.chat/stats.json&label=~chat&query=$.usercount&suffix=%20online&link=https:%2F%2Ftilde.chat&link=https:%2F%2Fweb.tilde.chat";
}
$name_url = urlencode($channel_name);
$name_link = urlencode(substr($channel_name,1));
$stats = json_decode(file_get_contents("https://tilde.chat/stats.json")) ?? array("channels"=>[]);
foreach ($stats->channels as $key=>$channel) {
if ($channel->name==$channel_name) {
return "https://img.shields.io/badge/dynamic/json.svg?url=https://tilde.chat/stats.json&label=~chat&query=$.channels[$key].usercount&suffix=%20online%20on%20{$name_url}&link=https:%2F%2Ftilde.chat&link=https:%2F%2Fweb.tilde.chat%2F%3Fjoin%3D{$name_link}&colorB=%2300cc00";
return "https://img.shields.io/badge/dynamic/json.svg?url=https://tilde.chat/stats.json&label=~chat&query=$.channels[$key].usercount&suffix=%20online%20on%20{$name_url}&link=https:%2F%2Ftilde.chat&link=https:%2F%2Fweb.tilde.chat%2F%3Fjoin%3D{$name_link}";
}
}
return "https://img.shields.io/badge/~chat-invalid%20channel-red.svg";

1
blacklist.json.example Normal file
View File

@ -0,0 +1 @@
{"blacklist":["#channel1","#channel2"]}

View File

@ -1,11 +1,6 @@
{
"require": {
"tildeverse/wiki": "dev-master"
},
"repositories": [
{
"type": "vcs",
"url": "https://tildegit.org/ben/tildewiki"
}
]
"michelf/php-markdown": "^1.8",
"mnapoli/front-yaml": "^1.6"
}
}

113
composer.lock generated
View File

@ -4,24 +4,23 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "3ab3df15c4e40417f427b37691e83088",
"content-hash": "d6a1ecb21bac8642fb0b75ee1e70eced",
"packages": [
{
"name": "erusev/parsedown",
"version": "1.7.3",
"version": "1.7.0",
"source": {
"type": "git",
"url": "https://github.com/erusev/parsedown.git",
"reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7"
"reference": "6678d59be48c4be64eaca6ce70bea48a09488cc2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/erusev/parsedown/zipball/6d893938171a817f4e9bc9e86f2da1e370b7bcd7",
"reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7",
"url": "https://api.github.com/repos/erusev/parsedown/zipball/6678d59be48c4be64eaca6ce70bea48a09488cc2",
"reference": "6678d59be48c4be64eaca6ce70bea48a09488cc2",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"php": ">=5.3.0"
},
"require-dev": {
@ -50,51 +49,53 @@
"markdown",
"parser"
],
"time": "2019-03-17T18:48:37+00:00"
"time": "2018-02-28T11:41:37+00:00"
},
{
"name": "erusev/parsedown-extra",
"version": "0.7.1",
"name": "michelf/php-markdown",
"version": "1.8.0",
"source": {
"type": "git",
"url": "https://github.com/erusev/parsedown-extra.git",
"reference": "0db5cce7354e4b76f155d092ab5eb3981c21258c"
"url": "https://github.com/michelf/php-markdown.git",
"reference": "01ab082b355bf188d907b9929cd99b2923053495"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/erusev/parsedown-extra/zipball/0db5cce7354e4b76f155d092ab5eb3981c21258c",
"reference": "0db5cce7354e4b76f155d092ab5eb3981c21258c",
"url": "https://api.github.com/repos/michelf/php-markdown/zipball/01ab082b355bf188d907b9929cd99b2923053495",
"reference": "01ab082b355bf188d907b9929cd99b2923053495",
"shasum": ""
},
"require": {
"erusev/parsedown": "~1.4"
"php": ">=5.3.0"
},
"type": "library",
"autoload": {
"psr-0": {
"ParsedownExtra": ""
"psr-4": {
"Michelf\\": "Michelf/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
"BSD-3-Clause"
],
"authors": [
{
"name": "Emanuil Rusev",
"email": "hello@erusev.com",
"homepage": "http://erusev.com"
"name": "Michel Fortin",
"email": "michel.fortin@michelf.ca",
"homepage": "https://michelf.ca/",
"role": "Developer"
},
{
"name": "John Gruber",
"homepage": "https://daringfireball.net/"
}
],
"description": "An extension of Parsedown that adds support for Markdown Extra.",
"homepage": "https://github.com/erusev/parsedown-extra",
"description": "PHP Markdown",
"homepage": "https://michelf.ca/projects/php-markdown/",
"keywords": [
"markdown",
"markdown extra",
"parsedown",
"parser"
"markdown"
],
"time": "2015-11-01T10:19:22+00:00"
"time": "2018-01-15T00:49:33+00:00"
},
{
"name": "mnapoli/front-yaml",
@ -133,16 +134,16 @@
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.11.0",
"version": "v1.9.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "82ebae02209c21113908c229e9883c419720738a"
"reference": "e3d826245268269cd66f8326bd8bc066687b4a19"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a",
"reference": "82ebae02209c21113908c229e9883c419720738a",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19",
"reference": "e3d826245268269cd66f8326bd8bc066687b4a19",
"shasum": ""
},
"require": {
@ -154,7 +155,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.11-dev"
"dev-master": "1.9-dev"
}
},
"autoload": {
@ -187,20 +188,20 @@
"polyfill",
"portable"
],
"time": "2019-02-06T07:57:58+00:00"
"time": "2018-08-06T14:22:27+00:00"
},
{
"name": "symfony/yaml",
"version": "v4.3.2",
"version": "v4.1.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "c60ecf5ba842324433b46f58dc7afc4487dbab99"
"reference": "b832cc289608b6d305f62149df91529a2ab3c314"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/c60ecf5ba842324433b46f58dc7afc4487dbab99",
"reference": "c60ecf5ba842324433b46f58dc7afc4487dbab99",
"url": "https://api.github.com/repos/symfony/yaml/zipball/b832cc289608b6d305f62149df91529a2ab3c314",
"reference": "b832cc289608b6d305f62149df91529a2ab3c314",
"shasum": ""
},
"require": {
@ -219,7 +220,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.3-dev"
"dev-master": "4.1-dev"
}
},
"autoload": {
@ -246,45 +247,13 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2019-04-06T14:04:46+00:00"
},
{
"name": "tildeverse/wiki",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://tildegit.org/ben/tildewiki",
"reference": "751eb64c383cb7c6ec643eaf683b88aa1de351ea"
},
"require": {
"erusev/parsedown-extra": "^0.7.1",
"mnapoli/front-yaml": "^1.6"
},
"type": "library",
"autoload": {
"psr-4": {
"Tildeverse\\Wiki\\": "src/"
}
},
"license": [
"GPLv3"
],
"authors": [
{
"name": "Ben Harris",
"email": "ben@tilde.team"
}
],
"description": "parsedown extensions for tilde wikis",
"time": "2019-07-03T05:06:34+00:00"
"time": "2018-08-18T16:52:46+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
"tildeverse/wiki": 20
},
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],

47
discord/index.php Normal file
View File

@ -0,0 +1,47 @@
<?php
$title = 'tilde.chat discord bridge';
include __DIR__.'/../header.php';
?>
<h1>tilde.chat discord</h1>
<pre>
khuxkm Today at 1:39 AM
ATTENTION @everyone:
Due to recent events in the Discord server, we have decided to lock this Discord and accompanying IRC bridge until
further notice. On Monday, the IRC to Discord bridge will be shut down and all channels in this Discord will be set
to READ-ONLY. This decision will only be reversed when a full discussion has been held on moderation requirements,
rules, and certain members of our moderation team who appear to be missing.
How this affects you:
- If you primarily use Discord, you will have to use IRC from now on. tilde.team users can use our TheLounge instance at
https://irc.tilde.team/ for a Discord-like experience (or any other client of their choosing), whereas members of
other tildes can continue using their tilde's node in the tilde.chat network.
- If you primarily use IRC, all that changes is that you will not be able to use this Discord.
The behavior of some users in this Discord has been unacceptable and does not comply with our code of conduct.
Upon further review, we have decided that managing this Discord server is a bit more than we can handle without discussing
moderation in-depth. As such, ben and I (khuxkm) have decided to make this Discord READ-ONLY until we have come to a more
permanent decision (which may be to close this server permanently).
If you have any thoughts/ideas for the future of the discord bridge, please drop a line to ben or myself on IRC or by email
(@tilde.team). We can be found in the #sudoers channel.
Thanks for being a member of the tildeverse and working with us to figure out a chat solution that works for everyone!
</pre>
<!-- See above, but here are the links if you want 'em anyways:
<strong>which tilde are you part of?</strong>
<hr>
<p>
<a href="https://discord.gg/BH4Bs5U" class="btn btn-default">tilde.team</a>
<a href="https://discord.gg/GhmGb3x" class="btn btn-default">tilde.town</a>
<a href="https://discord.gg/sfhzHBc" class="btn btn-default">yourtilde.com</a>
</p>->
<?php
include __DIR__.'/../footer.php';

View File

@ -1,10 +1,10 @@
<br><br>
</div>
<footer class="text-center">
<a href="https://tildegit.org/tildeverse/tilde.chat">site source</a>
~ official ircnet of the <a href="https://tildeverse.org">tildeverse</a>
</footer>
<script src="/js/jquery.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<br><br>
</div>
<footer class="text-center">
<a href="https://tildegit.org/tildeverse/tilde.chat">site source</a> ~ official ircnet of the <a href="https://tildeverse.org">tildeverse</a>
</footer>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="./jasny-bootstrap.js"></script>
</body>
</html>

View File

@ -1,17 +1,17 @@
#!/usr/bin/env python3
#!/usr/bin/env python
import requests, json
import xml.etree.ElementTree as xml
WORK_DIR = "/var/www/tilde.chat"
try:
with open("blacklist.json") as f:
BLACKLIST = json.load(f)["blacklist"]
r = requests.get("http://localhost:8081/stats")
r.raise_for_status()
out = {}
d = xml.fromstring(r.text)
assert d.tag == "inspircdstats"
with open(f"{WORK_DIR}/blacklist", "r") as f:
BLACKLIST = f.read().splitlines()
def define(name, xps, vfilter=lambda x: x):
global out
@ -21,7 +21,7 @@ def define(name, xps, vfilter=lambda x: x):
define("usercount", "./general/usercount", int)
define("channelcount", "./general/channelcount", int)
schannels = d.findall("./channellist/channel")
# print(len(schannels))
channels = []
for schannel in schannels:
channel = dict(
@ -33,22 +33,21 @@ for schannel in schannels:
if schannel.findall("./channeltopic/topictext")[0].text is not None
else "No topic set"
)
# bugfix: if mode s is set and there's a topic, hide the topic
if (
# skip channels in the blacklist or with mode +s
"s" in schannel.findall("./channelmodes")[0].text.split()[0]
or channel["name"] in BLACKLIST
and channel["topic"] != "No topic set"
):
channel["topic"] = "Topic hidden"
if channel["name"] in BLACKLIST:
# no stat output for blacklisted channels!!!!
continue
channel["webchatlink"] = "https://web.tilde.chat/?join=" + channel["name"].lstrip(
"#"
)
channels.append(channel)
channels.sort(key=lambda x: x["name"].lower())
out["channels"] = channels
# print([x.text for x in d.findall("./channellist/channel/channeltopic/topictext")])
with open(f"{WORK_DIR}/stats.json", "w") as f:
with open("/var/www/tilde.chat/stats.json", "w") as f:
json.dump(out, f)

View File

@ -3,16 +3,11 @@
<hr>
<p>hey hi</p>
<p>tilde.chat is the irc network of the <a href="https://tildeverse.org">tildeverse</a>, an association of social unix servers built as an intentional community for teaching, learning, and sharing.</p>
<p>tilde.chat is an irc network for tildes: social unix servers built as an intentional community for teaching, learning, and sharing.</p>
<p>tilde.chat is meant to be a space for all tilde members to hang out, share, teach, and learn.</p>
<p><a rel="me" href="https://tilde.zone/@tildeverse">!toot goes here: mastodon</a></p>
<!--
<p>feel free to contact a tilde.team admin (<?php
$members = json_decode(file_get_contents("https://tildeverse.org/members.json"))->members;
foreach ($members as $member)
if ($member->name == "tilde.team")
$team = $member;
<p>feel free to contact a tilde.team admin (<?php
$team = json_decode(file_get_contents("members.json"))->members[0];
$count = count($team->sysadmins);
foreach($team->sysadmins as $sysadmin) {
echo "<a href='{$sysadmin[1]}'>{$sysadmin[0]}</a>";
@ -21,40 +16,35 @@
$count--;
}
}?>) for more info as we flesh out this site</p>
-->
<h3>connection info</h3>
<p>you can connect to <em>irc.</em>tilde.chat on port 6697 with ssl</p>
<p>irc.tilde.chat is a round-robin host that will return any of the <a href="wiki/?page=servers">available servers</a></p>
<p>
if you're getting a higher ping than you'd like, try one of the geo-round-robins:
<em>na</em>.tilde.chat, <em>eu</em>.tilde.chat, and <em>au</em>.tilde.chat on port 6697 with ssl.
</p>
<p>you can connect to tilde.chat on port 6697 with ssl</p>
<p>or localhost 6667 from a shell on any of the member tildes :) (port 7766 on ~town)</p>
<h3>mumble server</h3>
<p>connect to mumble.tilde.chat on the default port using "tilde.chat" as the password and talk!</p>
<p>connect to tilde.chat on the default port and talk!</p>
<p>might not be anyone there. shout about it on irc first!</p>
<h3>member tildes</h3>
<ul>
<?php
$members = json_decode(file_get_contents("members.json"))->members;
foreach($members as $member) {
echo "\t\t<li><a href='{$member->link}'>{$member->name}</a> (sysadmin";
if (count($member->sysadmins) != 1) {
if (count($member->sysadmins)!=1) {
echo "s"; // plural
}
echo ": ";
$count = count($member->sysadmins);
foreach ($member->sysadmins as $sysadmin) {
foreach($member->sysadmins as $sysadmin) {
echo "<a href='{$sysadmin[1]}'>{$sysadmin[0]}</a>";
if ($count > 1) {
if ($count>1) {
echo ", ";
$count--;
}
}
echo ", channel: {$member->channel})</li>&nbsp;&nbsp;{$member->description}<br><br>\n";
echo ", channel: {$member->private_channel})</li>&nbsp;&nbsp;Description: \"{$member->description}\"<br><br>\n";
}
?>
@ -63,8 +53,17 @@
<hr>
<!-- misc channel info -->
<h3><a href="/stats/">channel info and stats</a></h3>
<h3>channel info</h3>
<a href="/stats/">stats here</a>
<pre>
#meta ~ main lobby channel
#projects ~ project ideas and discussions
#shitposting ~ somewhere to put your bad memes
#chaos ~ everyone's opped and anything goes
#town ~ private channel for tilde.town (you can only join from ~town)
#team ~ channel for tilde.team-specific stuff
#tilderadio ~ official channel for tilderadio
</pre>
<!-- closed. see: https://tilde.chat/discord/
<p>* = bridged to discord: tilde.chat private discord invites for tilde members <a href="/discord">here</a>. join and confirm that you're a tilde member to get access to the channels (including a private Discord channel for your tilde). bridging configuration can be adjusted per request.</p>
@ -72,9 +71,7 @@
<hr>
<h3>rules/guidelines</h3>
<p>please see the <a href="wiki/?page=etiquette">etiquette guide</a></p>
<p>chatting/using tilde.chat irc servers implies agreement with the <a href="https://tilde.wiki/?page=code-of-conduct">code of conduct</a>. the <a href="https://tilde.town/wiki/conduct.html">tilde.town code of conduct</a> applies as well.</p>
<p>if you have anything that needs oper attention, please send a mail to opers at tilde dot chat.</p>
<p>chatting/using tilde.chat irc servers implies agreement with the <a href="https://tilde.team/wiki/?page=code-of-conduct">code of conduct</a>. the <a href="https://tilde.town/wiki/conduct.html">tilde.town code of conduct</a> applies as well.</p>
<p>incidents will be handled according to the CoC as well as by admins of your home tilde</p>
<?php include 'footer.php'; ?>

1024
jasny-bootstrap.js Normal file

File diff suppressed because it is too large Load Diff

7
js/bootstrap.min.js vendored

File diff suppressed because one or more lines are too long

4
js/jquery.min.js vendored

File diff suppressed because one or more lines are too long

48
members.json Normal file
View File

@ -0,0 +1,48 @@
{
"members": [
{
"private_channel": "#team",
"name": "tilde.team",
"sysadmins": [
[
"ben",
"https://ben.tilde.team/"
],
[
"khuxkm",
"https://khuxkm.tilde.team/"
],
[
"cmccabe",
"https://cmccabe.tilde.team/"
]
],
"link": "https://tilde.team",
"description": "non-commercial space for teaching, learning, and enjoying the social medium of unix"
},
{
"private_channel": "#town",
"name": "tilde.town",
"sysadmins": [
[
"vilmibm",
"https://tilde.town/~vilmibm/"
]
],
"link": "https://tilde.town",
"description": "intentional digital community for making art, socializing, and learning"
},
{
"private_channel": "#your",
"name": "yourtilde.com",
"sysadmins": [
[
"deepend",
"https://yourtilde.com/~deepend/"
]
],
"link": "https://yourtilde.com",
"description": "basically a social network inside SSH: there is chat, email, forums, games, and lots more."
}
]
}

View File

@ -11,11 +11,17 @@
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="/wiki/"><i class="fa fa-edit"></i> wiki</a></li>
<li><a href="https://quotes.tilde.chat/"><i class="fa fa-comment"></i> qdb</a></li>
<li><a href="https://web.tilde.chat/"><i class="fa fa-comments-o"></i> webchat</a></li>
<li><a href="/stats/"><i class="fa fa-bar-chart"></i> stats</a></li>
<li><a href="/badges/"><i class="fa fa-shield"></i> badges</a></li>
<li><a href="/">home</a></li>
<li><a href="/wiki/">wiki</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">~chat pages <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="https://quotes.tilde.chat/"><i class="fa fa-comment"></i> ~chat qdb</a></li>
<li><a href="https://web.tilde.chat/"><i class="fa fa-comments-o"></i> ~webchat</a></li>
<li><a href="https://tilde.chat/stats/"><i class="fa fa-bar-chart"></i> network stats</a></li>
<li><a href="https://tilde.chat/badges/"><i class="fa fa-shield"></i> status badges</a></li>
</ul>
</li>
</ul>
</div>
</div>

View File

@ -1,7 +0,0 @@
hey hi
please see
https://tilde.chat/wiki/?page=etiquette
for more information on the rules for tilde.chat

View File

@ -7,8 +7,7 @@ include __DIR__."/../header.php";
<h1>stats</h1>
<hr>
<p>there are <?=$stats->usercount?> users across <?=$stats->channelcount?> channels.</p>
<p>if the channel is set with <a href="https://wiki.inspircd.org/Channel_Modes">chanmode +s</a> it will be omitted from this list.</p>
<p>There are <?=$stats->usercount?> users across <?=$stats->channelcount?> channels.</p>
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover">
<thead>
@ -31,27 +30,6 @@ include __DIR__."/../header.php";
</table>
</div>
<hr>
<p>also available as <a href="/stats.json">json</a>.</p>
<script>
// sort stats page
const getCellValue = (tr, idx) => tr.children[idx].innerText || tr.children[idx].textContent;
const comparer = (idx, asc) => (a, b) => ((v1, v2) =>
v1 !== '' && v2 !== '' && !isNaN(v1) && !isNaN(v2) ? v1 - v2 : v1.toString().localeCompare(v2)
)(getCellValue(asc ? b : a, idx), getCellValue(asc ? a : b, idx));
// do the work...
document.querySelectorAll('th').forEach(function(th) {
th.addEventListener('click', (() => {
const table = th.closest('table').querySelector("tbody");
Array.from(table.querySelectorAll('tr'))
.sort(comparer(Array.from(th.parentNode.children).indexOf(th), this.asc = !this.asc))
.forEach(tr => table.appendChild(tr) );
}));
th.style.cursor = 'pointer';
});
</script>
<p>Available in <a href="/stats.json">JSON format</a>.</p>
<?php include __DIR__."/../footer.php"; ?>

View File

@ -1,8 +1,6 @@
<?php
require __DIR__.'/../vendor/autoload.php';
use Tildeverse\Wiki\Parser;
$additional_head = "
<style>
:target:before {
@ -16,7 +14,21 @@ $additional_head = "
<meta property='og:site_name' content='tilde.chat wiki'>
";
$parser = Parser::factory();
class MDParser implements Mni\FrontYAML\Markdown\MarkdownParser {
public function __construct() {
$this->mdparser = new Michelf\MarkdownExtra();
$this->mdparser->header_id_func = function ($header) {
return preg_replace('/[^a-z0-9]/', '-', strtolower($header));
};
}
public function parse($markdown) {
return $this->mdparser->transform($markdown);
}
}
$parser = new Mni\FrontYAML\Parser(null, new MDParser());
if (!isset($_GET["page"]) || !file_exists("pages/{$_GET['page']}.md")) {
@ -36,7 +48,6 @@ if (!isset($_GET["page"]) || !file_exists("pages/{$_GET['page']}.md")) {
<p>if you want to contribute, check out the
<a href="https://tildegit.org/tildeverse/tilde.chat/src/branch/master/wiki">source</a> and open a PR!
</p>
<p>commits to master will be automatically deployed</p>
<hr>
<h3>pages:</h3>
@ -45,7 +56,7 @@ if (!isset($_GET["page"]) || !file_exists("pages/{$_GET['page']}.md")) {
foreach (glob("pages/*.md") as $page) {
$yaml = $parser->parse(file_get_contents($page))->getYAML();
if (!$yaml["published"]) continue; ?>
<a href="<?=basename($page, ".md")?>"><?=$yaml["title"]?></a><br>
<a href="?page=<?=basename($page, ".md")?>"><?=$yaml["title"]?></a><br>
<?php }
} else {
@ -65,7 +76,7 @@ if (!isset($_GET["page"]) || !file_exists("pages/{$_GET['page']}.md")) {
<a href=".">&lt; ~wiki</a>
<hr>
<?=$pg->getContent()?>
<?=str_replace("<table", '<table class="table table-striped"', $pg->getContent())?>
<hr>
<a href="https://tildegit.org/tildeverse/tilde.chat/src/branch/master/wiki/pages/<?=$_GET["page"]?>.md">
<i class="fa fa-edit"></i> source

View File

@ -24,9 +24,7 @@ be conservative about automatically re-connecting to the server or channel.
if your bot's code is not yet stable, keep it in the #bots channel and do testing there.
don't join #chaos or unless you want your bot to be spammed to hell and back.
all of the bots should also adhere to the following RFC specification: [RFC 2: Standardising IRC Bot Behavior](https://rfc.tildeverse.org/rfcs/2).
don't join #chaos or #shitposting unless you want your bot to be spammed to hell and back.
## tilde.team bot starter kit
@ -44,51 +42,3 @@ follow the example of sedbot when you add your bot in a PR to the wiki
+ most regex character classes match here
+ flags include `g` and `i`
- [source](https://tildegit.org/ben/sedbot)
* bitbot
- botmaster: [~jesopo](https://lolnerd.net)
- short description: hand-crafted, artisanal `IRCv3` bot. slowly taking over `tilde.chat`. we bow before bitbot.
- list of functions:
+ `sed`-like corrections like `sedbot`
+ weather/time per user (`,weather`/`,w`/`,time`)
+ user pronouns: `,pronouns`
+ wolfram alpha integration: `,wa`
+ translation services: `,translate le pain est sale`
+ some per-user configuration available via `,config`
+ git hooks (including gitea) - notifications on push/etc
+ write your own functionality with a plugin!
+ ducc frens (when a duck appears: `,bef`/`,trap`, see stats with `,friends`/`,enemies`)
- [source](https://github.com/jesopo/bitbot)
* tracer
- botmaster: [~ben](https://ben.tilde.team)
- short description: generate tracery output from grammars in you ~/.tracery (on ~team) -
forked and ported from [selfsame/tracer](https://notabug.org/selfsame/tracer) for py3 support
- list of functions:
+ !!list
+ !!<grammar>
+ !!fuse <grammar1> <grammar2>
+ | at the end of commands will echo the output in a new message
eg: !!drink | !toot
- [source](https://tildegit.org/ben/tracer)
* tooter
- botmaster: [~ben](https://ben.tilde.team)
- short description: toots from @tildeverse@tilde.zone (@tildeteam@tilde.zone in #team)
- list of functions:
+ !toot <message>
- [source](https://tildegit.org/ben/tooter)
* radiobot
- botmaster: [~ben](https://ben.tilde.team)
- short description: a janky bot in bash to post tilderadio updates - also toots from @tilderadio@tilde.zone
- list of functions:
+ radiobot: subscribe (or unsubscribe) - send a query when a dj goes online
+ radiobot: np - show what's currently playing on tilderadio
+ radiobot: dj - show who's currently broadcasting
+ radiobot: link - show a link to the tilderadio stream
+ radiobot: source - show a link to the sourcecode
+ radiobot: slogan - grab a random tilderadio slogan
- [source](https://tildegit.org/ben/radiobot)
* Babili
- botmaster: [~aewens](https://aewens.tilde.team)
- short description: A data aggregating bot for the IRC server, can as an API for other bots for handling historical data from the network
- list of functions:
+ View aggregated data at https://babili.xyz
- [source](https://tildegit.org/babili)

View File

@ -9,7 +9,7 @@ category:
# guidelines
some rules adapted from: [fizerkhan/irc-etiquette](https://github.com/fizerkhan/irc-etiquette)
some rules adapted from: https://github.com/fizerkhan/irc-etiquette
## no flooding/spamming/trolling in main channels
multiline messages belong in a pastebin. feel free to use https://ttm.sh (`echo text here | curl -F'file=@-;filename=stdin.txt'`) or https://paste.tildeverse.org for a graphical pastebin.
@ -28,12 +28,6 @@ sometimes you may feel that others are rude. you may get a response like "reinst
## try to not repeat yourself
asking the same question every minute is annoying. if anyone in the channel isn't paying attention then they will neither read you the second and third time. and those who came back from lunch or sleep will likely see in their "lastlog" what has happened lately. this is too demanding.
## avoid obnoxious behavior
the tildeverse is a purpose-driven community, intended to provide an environment where people can feel comfortable and supported in learning, practicing, or teaching about technology. while this purpose permits for a wide variety of activities on tildverse IRC channels, obnoxious or intentionally annoying behavior is not allowed. be considerate of the others on the IRC board; think
about how they will perceive your chat messages. if people ask you to stop something, it's probably because you're being obnoxious, and you should cut it out. examples of obnoxious behavior include posting your stream of consciousness ideas when you are not actually interacting with others, repeating variations of phrases over and over, intentional join/part spam, or
interacting with bots to the point of crowding out interactions from others.
## last but not least
be considerate to your fellow tildizens and don't forget to have fun!
@ -43,6 +37,4 @@ be considerate to your fellow tildizens and don't forget to have fun!
* second offenses will be handled with a 1 hour tempban. following the tempban, an irc/chan op will check in and let you know what kinds of behaviors to avoid.
* third offenses will be the same as second, but with a 24 hour tempban period.
if the undesirable behavior continues, further methods (up to and including a permanent ban) will be discussed among the oper team.
if you have something that requires oper attention, please send an email to opers at tilde dot chat.
if the undesirable behavior continues, further methods (up to and including a permanent ban) will be discussed among the op team.

View File

@ -1,20 +0,0 @@
---
author: ~khuxkm
published: true
title: Ham Radio Operators
description: list of ham radio operators in the tildeverse!
category:
- main
---
This is a list of callsigns of tildeverse members.
- [KD2BWZ = khuxkm](//khuxkm.tilde.team)
- [NB0X = nonlinear](//nonlinear.radiofreqs.space)
- [W8TAU = englishm](//englishm.tilde.team)
- [Z35TUN = tunas](//tilde.town/~tunas/)
- [KC8BRO = StarGazer](//stargazer.radiofreqs.space)
- [KC3LYZ = robertr](//robertr.radiofreqs.space)
- [N3FOS = LickTheCheese](//lickthecheese.fuckup.club)
A ham radio operator channel is available: [#hamradio](https://web.tilde.chat/?join=hamradio).

View File

@ -1,37 +0,0 @@
---
author: ~ben
published: true
title: tilde.chat servers
description: list of servers in the network
category:
- main
---
# server list
you can use irc.tilde.chat as a dns round robin between available servers. otherwise, feel free to connect directly to any of the nodes.
there are also three geo-round-robins available:
- na.tilde.chat
- eu.tilde.chat
- au.tilde.chat
try those for a more local connection. use port 6697 with ssl.
if you have an account on any of the shells, you can connect to localhost 6667 from there.
external connections use 6697 with ssl.
once you're connected, try `/map` to see the servers listed fully.
| server | location | hoster | notes |
|---|---|---|---|
| aussie.tilde.chat | australia | [aussies.space](https://aussies.space/) | |
| club.tilde.chat | canada | [tilde.club](https://tilde.club/) | |
| ctrl-c.tilde.chat | new york | [ctrl-c.club](http://ctrl-c.club) | |
| gingko.tilde.chat | texas | [bhh.sh](https://bhh.sh/) | |
| hub.tilde.chat | canada | [ben](https://ben.ttm.sh) | services, [webchat](https://web.tilde.chat), and [website](https://tilde.chat) live here |
| institute.tilde.chat | germany | [tilde.institute](https://tilde.institute/) | |
| team.tilde.chat | canada | [tilde.team](https://tilde.team/) | |
| thunix.tilde.chat | germany | [thunix](https://thunix.net) | |
| town.tilde.chat | toronto | [tilde.town](https://tilde.town/) | only accessible from localhost on port 7766; no external connections |

View File

@ -1,23 +0,0 @@
---
author: ~khuxkm
published: true
title: "#sevens"
description: Beware of those who speak in sevens, as you cannot know the fortitude of their souls. - A fun game khuxkm came up with.
category:
- main
---
# The game of #sevens
*Beware of those who speak in sevens, as you cannot know the fortitude of their souls.*
The game of #sevens is easy to pick up, and easy to understand, for anyone new. All messages must meet even one criterion:
- The amount of words used is 7.
- The amount of letters used is 7.
I understand this may be hard to do. For this, I provide you with help. If the amount of words or letters has 7 as its digital sum, the message passes.
If you fail, you get kicked out. Eventually, you'll be temporarily muted, but I'm tired.
This article was written to these specifications. It can't be that hard, can it?