Skip to content

Instantly share code, notes, and snippets.

@tulir
tulir / .checkroom.sh
Last active April 9, 2020 08:45
Matrix room server version checker
#!/bin/bash
if [[ -z "$HOMESERVER" ]]; then
echo "Please set the HOMESERVER environment variable to the C-S API URL (e.g. https://matrix.org)"
exit 1
elif [[ -z "$ACCESS_TOKEN" ]]; then
echo "Please set the ACCESS_TOKEN environment variable to your access token"
exit 1
elif [[ -z "$1" ]]; then
echo "Usage: $0 <alias without #>"
exit 1
<?php
/**
*
* This file is not a part of the phpBB Forum Software package.
* Please be sure what you are doing.
*
* This code is based on code written by Matthias Kesler
* Licensed under the Apache License, Version 2.0 (the "License");
* https://github.com/krombel/matrix-register-bot/
# This should be the public-facing name (ie: dns name)
HOME_SERVER_URL="https://matrix.org"
# The room ID is NOT the room alias. The ID can be found at the bottom of the room settings dialog in riot-web
ROOM_ID="!AbCDef823s:matrix.org"
# This is your user ID and access token. The access token must match the user.
USER_ID="@turt2live:matrix.org" # The home server should match this domain as well (ie: t2l.io as a HS should be :t2l.io in the user)
ACCESS_TOKEN="token_here"