- PHP 100%
| index.php | ||
| LICENSE.md | ||
| README.md | ||
PHP IRCv3 draft/FILEHOST Server
This is a simple PHP implementation of the IRCv3 draft/FILEHOST feature (also known as soju.im/FILEHOST).
It accepts data via POST, along with the user’s credentials, and then validates those credentials via SASL PLAIN auth and returns the URL to the uploaded resource. Uploaded data is stored in user-specific directories.
You can configure the script by editing the constants in the Configuration section near the top. You can also adjust the array of allowed file types (which in this initial commit are definitely not exhaustive, but I’ll come back soon to add common things that are currently missing).
This is in use on the irc.social.lol server, running Ergo, and seems to work great so far. It has not yet been tested extensively with other implementations or bouncers, though.
If you’re running Ergo, you can activate this feature by adding these entries in your ircd.yaml file, in the additional-isupport section:
"soju.im/FILEHOST": "https://irc.your-server.tld/upload/"
"draft/FILEHOST": "https://irc.your-server.tld/upload/"
(You’ll need to change the URL to match your own configuration/setup, and don’t forget to /rehash.)