Last active
December 9, 2019 15:20
-
-
Save zouppen/41ad19b6ed95511c49fa01f2d9c61576 to your computer and use it in GitHub Desktop.
IRCNet - Matrix plumbing tool
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -eu | |
# | |
# Change your IRC nickname and Matrix ID here | |
nick=Zouppeni | |
mxid='@zouppen:jkl.hacklab.fi' | |
if test $# -ne 2; then | |
echo Usage $0 IRC_CHANNEL ROOM_ID >&2 | |
exit 1 | |
fi | |
channel="$1" | |
room_id="$2" | |
export nick mxid channel room_id | |
jq -nc '{ | |
"remote_room_server": "irc.snt.utwente.nl", | |
"remote_room_channel": env.channel, | |
"matrix_room_id": env.room_id, | |
"op_nick": env.nick, | |
"user_id": env.mxid, | |
}' | curl -H 'Content-type: application/json' -X POST 'https://matrix-irc.snt.utwente.nl/ircnet/provision/link' -d '@-' | jq . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment