Compare commits

..

No commits in common. "master" and "master" have entirely different histories.

37 changed files with 1400 additions and 1824 deletions

View File

@ -1,28 +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 fetch
- sudo -Hu www-data git reset --hard origin/master
- sudo -Hu www-data composer install

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

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.
@ -21,14 +19,5 @@ stop by irc and say hi!
`<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;
}
}
```
5. `cp blacklist{.example,}`
6. `vim blacklist` - stats gen will fail if this is missing

View File

@ -1,10 +1,11 @@
<?php
include 'shieldsio.php';
if (!isset($_GET["channel"])) {
$badge = get_badge();
} else {
$badge = get_badge($_GET["channel"]);
}
header("Location: $badge");
die();
include 'shieldsio.php';
if (!isset($_GET["channel"])) {
$badge = get_badge();
header("Location: {$badge}");
} else {
$badge = get_badge($_GET["channel"]);
header("Location: {$badge}");
}
die();
?>

View File

@ -12,13 +12,13 @@
</tr>
</thead>
<tr>
<td>Network user count</td><td>https://tilde.chat/badges/badge.php</td><td><img src="badge.php" alt="user count badge"></td>
<td>Network user count</td><td>https://tilde.chat/badges/badge.php</td><td><img src="badge.php"></td>
</tr>
<tr>
<td>User count for #meta</td><td>https://tilde.chat/badges/badge.php?channel=%23meta</td><td><img src="badge.php?channel=%23meta" alt="#meta badge"></td>
<td>User count for #meta</td><td>https://tilde.chat/badges/badge.php?channel=%23meta</td><td><img src="badge.php?channel=%23meta"></td>
</tr>
<tr>
<td>Invalid channel name (error handling)</td><td>https://tilde.chat/badges/badge.php?channel=invalid</td><td><img src="badge.php?channel=invalid" alt="invalid badge"></td>
<td>Invalid channel name (error handling)</td><td>https://tilde.chat/badges/badge.php?channel=invalid</td><td><img src="badge.php?channel=invalid"></td>
</tr>
</table>
<?php include '../footer.php'; ?>

View File

@ -1,17 +1,16 @@
<?php
function get_badge($channel_name=FALSE): string
{
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%2Ftilde.chat%2Fkiwi%2F&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&colorB=%2300cc00";
}
$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%2Ftilde.chat%2Fkiwi%2F$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}&colorB=%2300cc00";
}
}
return "https://img.shields.io/badge/~chat-invalid%20channel-red.svg";
}
?>

2
blacklist.example Normal file
View File

@ -0,0 +1,2 @@
#mysecrets
#dontlookhere

View File

@ -1,6 +1,6 @@
{
"require": {
"tildeteam/wiki": "^2.0",
"ext-json": "*"
}
"require": {
"michelf/php-markdown": "^1.8",
"mnapoli/front-yaml": "^1.6"
}
}

762
composer.lock generated
View File

@ -4,41 +4,32 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "cbfe4e230864ce455fb4e62a47e4a7fc",
"content-hash": "d6a1ecb21bac8642fb0b75ee1e70eced",
"packages": [
{
"name": "dflydev/dot-access-data",
"version": "v3.0.2",
"name": "erusev/parsedown",
"version": "1.7.0",
"source": {
"type": "git",
"url": "https://github.com/dflydev/dflydev-dot-access-data.git",
"reference": "f41715465d65213d644d3141a6a93081be5d3549"
"url": "https://github.com/erusev/parsedown.git",
"reference": "6678d59be48c4be64eaca6ce70bea48a09488cc2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/f41715465d65213d644d3141a6a93081be5d3549",
"reference": "f41715465d65213d644d3141a6a93081be5d3549",
"url": "https://api.github.com/repos/erusev/parsedown/zipball/6678d59be48c4be64eaca6ce70bea48a09488cc2",
"reference": "6678d59be48c4be64eaca6ce70bea48a09488cc2",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
"php": ">=5.3.0"
},
"require-dev": {
"phpstan/phpstan": "^0.12.42",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.3",
"scrutinizer/ocular": "1.6.0",
"squizlabs/php_codesniffer": "^3.5",
"vimeo/psalm": "^4.0.0"
"phpunit/phpunit": "^4.8.35"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Dflydev\\DotAccessData\\": "src/"
"psr-0": {
"Parsedown": ""
}
},
"notification-url": "https://packagist.org/downloads/",
@ -47,181 +38,40 @@
],
"authors": [
{
"name": "Dragonfly Development Inc.",
"email": "info@dflydev.com",
"homepage": "http://dflydev.com"
},
{
"name": "Beau Simensen",
"email": "beau@dflydev.com",
"homepage": "http://beausimensen.com"
},
{
"name": "Carlos Frutos",
"email": "carlos@kiwing.it",
"homepage": "https://github.com/cfrutos"
},
{
"name": "Colin O'Dell",
"email": "colinodell@gmail.com",
"homepage": "https://www.colinodell.com"
"name": "Emanuil Rusev",
"email": "hello@erusev.com",
"homepage": "http://erusev.com"
}
],
"description": "Given a deep data structure, access data by dot notation.",
"homepage": "https://github.com/dflydev/dflydev-dot-access-data",
"description": "Parser for Markdown.",
"homepage": "http://parsedown.org",
"keywords": [
"access",
"data",
"dot",
"notation"
],
"support": {
"issues": "https://github.com/dflydev/dflydev-dot-access-data/issues",
"source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.2"
},
"time": "2022-10-27T11:44:00+00:00"
},
{
"name": "league/commonmark",
"version": "2.4.2",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/commonmark.git",
"reference": "91c24291965bd6d7c46c46a12ba7492f83b1cadf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/91c24291965bd6d7c46c46a12ba7492f83b1cadf",
"reference": "91c24291965bd6d7c46c46a12ba7492f83b1cadf",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"league/config": "^1.1.1",
"php": "^7.4 || ^8.0",
"psr/event-dispatcher": "^1.0",
"symfony/deprecation-contracts": "^2.1 || ^3.0",
"symfony/polyfill-php80": "^1.16"
},
"require-dev": {
"cebe/markdown": "^1.0",
"commonmark/cmark": "0.30.3",
"commonmark/commonmark.js": "0.30.0",
"composer/package-versions-deprecated": "^1.8",
"embed/embed": "^4.4",
"erusev/parsedown": "^1.0",
"ext-json": "*",
"github/gfm": "0.29.0",
"michelf/php-markdown": "^1.4 || ^2.0",
"nyholm/psr7": "^1.5",
"phpstan/phpstan": "^1.8.2",
"phpunit/phpunit": "^9.5.21 || ^10.5.9 || ^11.0.0",
"scrutinizer/ocular": "^1.8.1",
"symfony/finder": "^5.3 | ^6.0 || ^7.0",
"symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0 || ^7.0",
"unleashedtech/php-coding-standard": "^3.1.1",
"vimeo/psalm": "^4.24.0 || ^5.0.0"
},
"suggest": {
"symfony/yaml": "v2.3+ required if using the Front Matter extension"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "2.5-dev"
}
},
"autoload": {
"psr-4": {
"League\\CommonMark\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Colin O'Dell",
"email": "colinodell@gmail.com",
"homepage": "https://www.colinodell.com",
"role": "Lead Developer"
}
],
"description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)",
"homepage": "https://commonmark.thephpleague.com",
"keywords": [
"commonmark",
"flavored",
"gfm",
"github",
"github-flavored",
"markdown",
"md",
"parser"
],
"support": {
"docs": "https://commonmark.thephpleague.com/",
"forum": "https://github.com/thephpleague/commonmark/discussions",
"issues": "https://github.com/thephpleague/commonmark/issues",
"rss": "https://github.com/thephpleague/commonmark/releases.atom",
"source": "https://github.com/thephpleague/commonmark"
},
"funding": [
{
"url": "https://www.colinodell.com/sponsor",
"type": "custom"
},
{
"url": "https://www.paypal.me/colinpodell/10.00",
"type": "custom"
},
{
"url": "https://github.com/colinodell",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/league/commonmark",
"type": "tidelift"
}
],
"time": "2024-02-02T11:59:32+00:00"
"time": "2018-02-28T11:41:37+00:00"
},
{
"name": "league/config",
"version": "v1.2.0",
"name": "michelf/php-markdown",
"version": "1.8.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/config.git",
"reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3"
"url": "https://github.com/michelf/php-markdown.git",
"reference": "01ab082b355bf188d907b9929cd99b2923053495"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/config/zipball/754b3604fb2984c71f4af4a9cbe7b57f346ec1f3",
"reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3",
"url": "https://api.github.com/repos/michelf/php-markdown/zipball/01ab082b355bf188d907b9929cd99b2923053495",
"reference": "01ab082b355bf188d907b9929cd99b2923053495",
"shasum": ""
},
"require": {
"dflydev/dot-access-data": "^3.0.1",
"nette/schema": "^1.2",
"php": "^7.4 || ^8.0"
},
"require-dev": {
"phpstan/phpstan": "^1.8.2",
"phpunit/phpunit": "^9.5.5",
"scrutinizer/ocular": "^1.8.1",
"unleashedtech/php-coding-standard": "^3.1",
"vimeo/psalm": "^4.7.3"
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.2-dev"
}
},
"autoload": {
"psr-4": {
"League\\Config\\": "src"
"Michelf\\": "Michelf/"
}
},
"notification-url": "https://packagist.org/downloads/",
@ -230,66 +80,45 @@
],
"authors": [
{
"name": "Colin O'Dell",
"email": "colinodell@gmail.com",
"homepage": "https://www.colinodell.com",
"role": "Lead Developer"
"name": "Michel Fortin",
"email": "michel.fortin@michelf.ca",
"homepage": "https://michelf.ca/",
"role": "Developer"
},
{
"name": "John Gruber",
"homepage": "https://daringfireball.net/"
}
],
"description": "Define configuration arrays with strict schemas and access values with dot notation",
"homepage": "https://config.thephpleague.com",
"description": "PHP Markdown",
"homepage": "https://michelf.ca/projects/php-markdown/",
"keywords": [
"array",
"config",
"configuration",
"dot",
"dot-access",
"nested",
"schema"
"markdown"
],
"support": {
"docs": "https://config.thephpleague.com/",
"issues": "https://github.com/thephpleague/config/issues",
"rss": "https://github.com/thephpleague/config/releases.atom",
"source": "https://github.com/thephpleague/config"
},
"funding": [
{
"url": "https://www.colinodell.com/sponsor",
"type": "custom"
},
{
"url": "https://www.paypal.me/colinpodell/10.00",
"type": "custom"
},
{
"url": "https://github.com/colinodell",
"type": "github"
}
],
"time": "2022-12-11T20:36:23+00:00"
"time": "2018-01-15T00:49:33+00:00"
},
{
"name": "mnapoli/front-yaml",
"version": "2.0.3",
"version": "1.6.0",
"source": {
"type": "git",
"url": "https://github.com/mnapoli/FrontYAML.git",
"reference": "d42d84159f3725d50f7bda953ed90185b3c41cc4"
"reference": "24070ace8b741247bb3161cbb38ecc541268b296"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mnapoli/FrontYAML/zipball/d42d84159f3725d50f7bda953ed90185b3c41cc4",
"reference": "d42d84159f3725d50f7bda953ed90185b3c41cc4",
"url": "https://api.github.com/repos/mnapoli/FrontYAML/zipball/24070ace8b741247bb3161cbb38ecc541268b296",
"reference": "24070ace8b741247bb3161cbb38ecc541268b296",
"shasum": ""
},
"require": {
"league/commonmark": "^2.0",
"php": "^7.4|^8.0",
"symfony/yaml": "^4.0|^5.0|^6.0|^7.0"
"erusev/parsedown": "~1.0",
"php": ">=5.4.0",
"symfony/yaml": "~2.1|^3.0|^4.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0"
"league/commonmark": "~0.7",
"phpunit/phpunit": "~4.5"
},
"type": "library",
"autoload": {
@ -301,326 +130,54 @@
"license": [
"MIT"
],
"support": {
"source": "https://github.com/mnapoli/FrontYAML/tree/2.0.3"
},
"time": "2024-02-07T14:42:22+00:00"
},
{
"name": "nette/schema",
"version": "v1.3.0",
"source": {
"type": "git",
"url": "https://github.com/nette/schema.git",
"reference": "a6d3a6d1f545f01ef38e60f375d1cf1f4de98188"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nette/schema/zipball/a6d3a6d1f545f01ef38e60f375d1cf1f4de98188",
"reference": "a6d3a6d1f545f01ef38e60f375d1cf1f4de98188",
"shasum": ""
},
"require": {
"nette/utils": "^4.0",
"php": "8.1 - 8.3"
},
"require-dev": {
"nette/tester": "^2.4",
"phpstan/phpstan-nette": "^1.0",
"tracy/tracy": "^2.8"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause",
"GPL-2.0-only",
"GPL-3.0-only"
],
"authors": [
{
"name": "David Grudl",
"homepage": "https://davidgrudl.com"
},
{
"name": "Nette Community",
"homepage": "https://nette.org/contributors"
}
],
"description": "📐 Nette Schema: validating data structures against a given Schema.",
"homepage": "https://nette.org",
"keywords": [
"config",
"nette"
],
"support": {
"issues": "https://github.com/nette/schema/issues",
"source": "https://github.com/nette/schema/tree/v1.3.0"
},
"time": "2023-12-11T11:54:22+00:00"
},
{
"name": "nette/utils",
"version": "v4.0.4",
"source": {
"type": "git",
"url": "https://github.com/nette/utils.git",
"reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nette/utils/zipball/d3ad0aa3b9f934602cb3e3902ebccf10be34d218",
"reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218",
"shasum": ""
},
"require": {
"php": ">=8.0 <8.4"
},
"conflict": {
"nette/finder": "<3",
"nette/schema": "<1.2.2"
},
"require-dev": {
"jetbrains/phpstorm-attributes": "dev-master",
"nette/tester": "^2.5",
"phpstan/phpstan": "^1.0",
"tracy/tracy": "^2.9"
},
"suggest": {
"ext-gd": "to use Image",
"ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()",
"ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()",
"ext-json": "to use Nette\\Utils\\Json",
"ext-mbstring": "to use Strings::lower() etc...",
"ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause",
"GPL-2.0-only",
"GPL-3.0-only"
],
"authors": [
{
"name": "David Grudl",
"homepage": "https://davidgrudl.com"
},
{
"name": "Nette Community",
"homepage": "https://nette.org/contributors"
}
],
"description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.",
"homepage": "https://nette.org",
"keywords": [
"array",
"core",
"datetime",
"images",
"json",
"nette",
"paginator",
"password",
"slugify",
"string",
"unicode",
"utf-8",
"utility",
"validation"
],
"support": {
"issues": "https://github.com/nette/utils/issues",
"source": "https://github.com/nette/utils/tree/v4.0.4"
},
"time": "2024-01-17T16:50:36+00:00"
},
{
"name": "psr/event-dispatcher",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/event-dispatcher.git",
"reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0",
"reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0",
"shasum": ""
},
"require": {
"php": ">=7.2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\EventDispatcher\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Standard interfaces for event handling.",
"keywords": [
"events",
"psr",
"psr-14"
],
"support": {
"issues": "https://github.com/php-fig/event-dispatcher/issues",
"source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0"
},
"time": "2019-01-08T18:20:26+00:00"
},
{
"name": "symfony/deprecation-contracts",
"version": "v3.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "7c3aff79d10325257a001fcf92d991f24fc967cf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf",
"reference": "7c3aff79d10325257a001fcf92d991f24fc967cf",
"shasum": ""
},
"require": {
"php": ">=8.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.4-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"autoload": {
"files": [
"function.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2023-05-23T14:45:45+00:00"
"time": "2017-10-29T19:29:55+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.29.0",
"version": "v1.9.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4"
"reference": "e3d826245268269cd66f8326bd8bc066687b4a19"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4",
"reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19",
"reference": "e3d826245268269cd66f8326bd8bc066687b4a19",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"provide": {
"ext-ctype": "*"
"php": ">=5.3.3"
},
"suggest": {
"ext-ctype": "For best performance"
},
"type": "library",
"extra": {
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
"branch-alias": {
"dev-master": "1.9-dev"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
}
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Gert de Pagter",
"email": "BackEndTea@gmail.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
},
{
"name": "Gert de Pagter",
"email": "BackEndTea@gmail.com"
}
],
"description": "Symfony polyfill for ctype functions",
@ -631,133 +188,41 @@
"polyfill",
"portable"
],
"support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "symfony/polyfill-php80",
"version": "v1.29.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b",
"reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"type": "library",
"extra": {
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ion Bazan",
"email": "ion.bazan@gmail.com"
},
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-01-29T20:11:03+00:00"
"time": "2018-08-06T14:22:27+00:00"
},
{
"name": "symfony/yaml",
"version": "v7.0.3",
"version": "v4.1.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "2d4fca631c00700597e9442a0b2451ce234513d3"
"reference": "b832cc289608b6d305f62149df91529a2ab3c314"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/2d4fca631c00700597e9442a0b2451ce234513d3",
"reference": "2d4fca631c00700597e9442a0b2451ce234513d3",
"url": "https://api.github.com/repos/symfony/yaml/zipball/b832cc289608b6d305f62149df91529a2ab3c314",
"reference": "b832cc289608b6d305f62149df91529a2ab3c314",
"shasum": ""
},
"require": {
"php": ">=8.2",
"symfony/polyfill-ctype": "^1.8"
"php": "^7.1.3",
"symfony/polyfill-ctype": "~1.8"
},
"conflict": {
"symfony/console": "<6.4"
"symfony/console": "<3.4"
},
"require-dev": {
"symfony/console": "^6.4|^7.0"
"symfony/console": "~3.4|~4.0"
},
"suggest": {
"symfony/console": "For validating YAML files using the lint command"
},
"bin": [
"Resources/bin/yaml-lint"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.1-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Yaml\\": ""
@ -780,67 +245,9 @@
"homepage": "https://symfony.com/contributors"
}
],
"description": "Loads and dumps YAML files",
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/yaml/tree/v7.0.3"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-01-23T15:02:46+00:00"
},
{
"name": "tildeteam/wiki",
"version": "2.0.8",
"source": {
"type": "git",
"url": "https://tildegit.org/team/tildewiki",
"reference": "dcbb9740225768c74cfd0002a150549cd6df4bc4"
},
"require": {
"mnapoli/front-yaml": "^2.0.0",
"php": "^7.4|^8.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5"
},
"type": "library",
"autoload": {
"psr-4": {
"tildeteam\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-3.0-or-later"
],
"authors": [
{
"name": "Ben Harris",
"email": "ben@tilde.team",
"homepage": "https://tilde.team/~ben/",
"role": "Developer"
}
],
"description": "unified extensions for tilde wikis",
"homepage": "https://tildegit.org/team/tildewiki",
"keywords": [
"markdown",
"wiki"
],
"time": "2022-02-16T18:31:48+00:00"
"time": "2018-08-18T16:52:46+00:00"
}
],
"packages-dev": [],
@ -849,9 +256,6 @@
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"ext-json": "*"
},
"platform-dev": [],
"plugin-api-version": "2.3.0"
"platform": [],
"platform-dev": []
}

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,65 +1,54 @@
#!/usr/bin/env python3
import base64
import json
from lxml import etree
import requests, json
import xml.etree.ElementTree as xml
WORK_DIR = "/var/www/tilde.chat"
r = requests.get("http://localhost:8081/stats")
r.raise_for_status()
out = {}
parser = etree.XMLParser(strip_cdata=False)
root = etree.parse("http://localhost:8081/stats", parser)
assert root.getroot().tag == "inspircdstats"
d = xml.fromstring(r.text)
assert d.tag == "inspircdstats"
with open(f"{WORK_DIR}/blacklist", "r") as f:
BLACKLIST = f.read().splitlines()
def unsanitize(node, default=""):
# workaround for weird behavior in insp's xml output
# https://github.com/inspircd/inspircd/blob/v3.7.0/src/modules/m_httpd_stats.cpp#L55
if node.text is None or node.text == "":
return default
elif str(etree.tostring(node)).startswith(f"b'<{node.tag}><![CDATA["):
missing_padding = len(node.text) % 4
if missing_padding:
v = node.text + "=" * (4 - missing_padding)
else:
v = node.text
try:
return base64.b64decode(v).decode("utf-8")
except:
return "failed to read topic as utf-8"
return node.text
def define(name, xps, vfilter=lambda x: x):
global out
out[name] = vfilter(d.findall(xps)[0].text)
out["usercount"] = int(root.find("./general/usercount").text)
out["channelcount"] = int(root.find("./general/channelcount").text)
define("usercount", "./general/usercount", int)
define("channelcount", "./general/channelcount", int)
schannels = d.findall("./channellist/channel")
out["channels"] = []
for c in root.findall("./channellist/channel"):
name = unsanitize(c.find("channelname"))
channels = []
for schannel in schannels:
channel = dict(
name=schannel.findall("channelname")[0].text,
usercount=int(schannel.findall("usercount")[0].text),
)
channel["topic"] = (
schannel.findall("./channeltopic/topictext")[0].text
if schannel.findall("./channeltopic/topictext")[0].text is not None
else "No topic set"
)
modes = c.find("./channelmodes").text
if (
# skip channels in the blacklist or with mode +s
name in BLACKLIST
or modes is None
or "s" in modes.split()[0]
"s" in schannel.findall("./channelmodes")[0].text.split()[0]
or channel["name"] in BLACKLIST
):
continue
out["channels"].append(
dict(
name=name,
topic=unsanitize(c.find("./channeltopic/topictext"), "no topic set"),
usercount=int(c.find("usercount").text),
webchatlink="https://tilde.chat/kiwi/" + name,
)
channel["webchatlink"] = "https://web.tilde.chat/?join=" + channel["name"].lstrip(
"#"
)
channels.append(channel)
out["channels"].sort(key=lambda x: x["name"].lower())
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:
json.dump(out, f)

View File

@ -14,15 +14,7 @@
<meta property="og:image" content="https://tilde.chat/apple-icon.png">
<meta property="og:site_name" content="tilde.chat">
<meta property="og:type" content="website">
<style>
/* offset #fragments */
:target:before {
content: "";
display: block;
height: 70px;
margin: -70px 0 0;
}
</style>
</head>
<body style="padding-top: 70px;">
<div class="container">

109
index.php
View File

@ -1,51 +1,76 @@
<?php include 'header.php'; ?>
<h1>tilde.chat <img src="/badges/badge.php" alt="tilde user badge"></h1>
<hr>
<h1>tilde.chat <img src="/badges/badge.php"></h1>
<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 a place for tilde-folk and friends to gather and communicate.</p>
<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 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>
<h3>connection info</h3>
<p>point your client to <a href="ircs://irc.tilde.chat:6697"><em>irc.</em>tilde.chat</a> on port 6697 with ssl/tls</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/tls.
</p>
<p>plaintext <a href="irc://localhost:6667">on localhost port 6667</a> is available at a shell on <a href="wiki/servers">tildes that run chat nodes</a> (port 7766 on ~town)</p>
<p>if you don't have a client ready to go, try using our <a href="https://tilde.chat/kiwi/">kiwiirc webchat</a> or our <a href="https://tilde.chat/gamja/">gamja webchat</a>.</p>
<p>
you can also connect from any xmpp client with our <a href="https://biboumi.louiz.org">biboumi gateway</a>.
it runs on <a href="https://tilde.team/wiki/xmpp#biboumi">tilde.team</a>'s xmpp server.
channels can be joined with this room-format: <a href="xmpp:#helpdesk@biboumi.tilde.team?join">#helpdesk@biboumi.tilde.team</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;
$count = count($team->sysadmins);
foreach($team->sysadmins as $sysadmin) {
echo "<a href='{$sysadmin[1]}'>{$sysadmin[0]}</a>";
if ($count>1) {
echo ", ";
$count--;
}
}?>) for more info as we flesh out this site</p>
-->
<h3>how to irc?</h3>
<p>if you have never used irc before, you might find <a href="wiki/intro">our intro to irc guide</a> useful.
<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>or localhost 6667 from a shell on any of the member tildes :) (port 7766 on ~town)</p>
<h3>channel novelties</h3>
<p>there are some fun things on tilde.chat run by <a href="wiki/bots">robots</a>, such as:<p>
<ul>
<li><p>in channels with <em>tooter</em> in them, <a rel="me" href="https://tilde.zone/@tildeverse">!toot goes here: mastodon</a></p></li>
<li><p><em>badger</em> is a bot that gives you badges for participating in channels it is in</p></li>
</ul>
<h3>mumble server</h3>
<p>connect to mumble.tilde.chat on the default port and talk!</p>
<p>might not be anyone there. shout about it on irc first!</p>
<h3>mumble server</h3>
<p>we also have non-irc voice chat!</p>
<p>use a <a href="https://mumble.info">mumble client</a> to connect to tilde.chat on the default port using "tilde.chat" as the password and talk!</p>
<p>might not be anyone there. shout about it on irc first!</p>
<h3>member tildes</h3>
<ul>
<hr>
<h3>rules/guidelines</h3>
<p>please see the <a href="wiki/etiquette">etiquette guide</a></p>
<p>chatting/using tilde.chat irc servers implies agreement with the <a href="https://tilde.wiki/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>it is recommended that you read the guide and codes of conduct, and try to abide by them even if you disagree</p>
<ul>
<li><p>failing to do so may result in your removal from individual channels, or the whole tilde.chat network.</p></li>
<li><p>bad behaviour may, on rare occasions, also result in tilde admins reconsidering your membership.</p></li>
<li><p>warnings before removal are usually given but are not guaranteed.</p></li>
</ul>
<p>if you have anything that needs oper attention, please send a mail to opers at tilde dot chat, or ask in #helpdesk</p>
<p>incidents will be handled according to the CoC as well as by admins of your home tilde</p>
<?php
foreach($members as $member) {
echo "\t\t<li><a href='{$member->link}'>{$member->name}</a> (sysadmin";
if (count($member->sysadmins) != 1) {
echo "s"; // plural
}
echo ": ";
$count = count($member->sysadmins);
foreach ($member->sysadmins as $sysadmin) {
echo "<a href='{$sysadmin[1]}'>{$sysadmin[0]}</a>";
if ($count > 1) {
echo ", ";
$count--;
}
}
echo ", channel: {$member->channel})</li>&nbsp;&nbsp;{$member->description}<br><br>\n";
}
?>
</ul>
<hr>
<!-- misc channel info -->
<h3><a href="/stats/">channel info and stats</a></h3>
<!-- 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>
-->
<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 <a href="mailto:opers@tilde.chat">opers@tilde.chat</a>.</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

View File

@ -1,33 +0,0 @@
<?php
header("Content-Type: text/plain");
$node = $_GET["node"] ?? "hub";
echo shell_exec("figlet -w120 -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. you must log in with nickserv to speak there.\n";
echo "to get registered, run /quote ns help register or read our wiki: https://tilde.chat/wiki/nicks\n";
echo "check out https://tilde.chat/stats/ or run /list to find other channels\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 excellent to each other ~~";

View File

@ -1,30 +1,28 @@
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">~chat</a>
</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 class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-comments-o"></i> webchat <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a href="/kiwi/">kiwiirc</a></li>
<li><a href="/gamja/">gamja</a></li>
</ul>
</li>
<li><a href="/stats/"><i class="fa fa-bar-chart"></i> channels</a></li>
<li><a href="/badges/"><i class="fa fa-shield"></i> badges</a></li>
</ul>
</div>
</div>
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">~chat</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<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>
</nav>

View File

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

View File

@ -2,28 +2,13 @@
$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", false, stream_context_create(['socket' => ['bindto' => '0:0']])))->members;
include __DIR__."/../header.php";
?>
<h1>channels</h1>
<h3><a href="https://tildeverse.org/members/">member tildes</a></h3>
<?php foreach($members as $member) {
$chans = explode(", ", $member->channel); ?>
<div class="btn-group">
<a class="btn btn-default" href="<?=htmlspecialchars($member->link)?>"><?=htmlspecialchars($member->name)?></a>