- optional prefix ("$")
- optional negation ("~")
- char denoting meaning ("a")
- separator character (":")
$,~,a,:
from src import ModuleManager, utils | |
class Module(ModuleManager.BaseModule): | |
@utils.hook("api.post.hashbang-argocd") | |
def webhook(self, event): | |
server = self.bot.get_server_by_alias("hashbang") | |
if server and "#!" in server.channels: | |
channel = server.channels.get("#!") | |
data = event["data"].decode("utf8") |
clients and bots are unable to detect a given IRCd's method of quieting/muting users. exposing instructions on how to apply and list these will be of great benefit for making quiets easier for those not overinformed about IRC's technical details.
this will also trivialise applying and selectively removing quiets for channel service bots; they can apply and remove specific quiets and can list all active quiets.
bots, like BitBot, track user accounts (through WHOX, extended-join
, account-notify
) to grant permissions to users without them having to register/identify directly with BitBot.
This works well most of the time but there's two problematic situations;
firstly, almost every other chat platform supports editable/deletable messages as a user convenience - a convenience that people grow to expect.
secondly, moderation often needs ability to edit or delete messages (think NSFW urls)
this spec provides a draft/editmsg
CAP as the fallback functionality requires server intervention.
#!/bin/bash | |
CONTENT_FILE=`mktemp` | |
# write headers directly to stdout ("-D-") | |
# write content to temp file to later pass through |jq ("-o $CONTENT_FILE") | |
curl -D- -s -H "Accept: application/activity+json" "$1" -o $CONTENT_FILE | |
cat $CONTENT_FILE | jq | |
rm $CONTENT_FILE |
#!/usr/bin/env python3 | |
# $ chmod +x git-clone.py | |
# $ ./git-clone.py https://github.com/jesopo/bitbot.git | |
import sys | |
import requests | |
repo = sys.argv[1] |
from src import ModuleManager, utils | |
URL = "https://ttm.sh" | |
class Module(ModuleManager.BaseModule): | |
def on_load(self): | |
self.exports.add("shorturl-s-ttmsh", self._shorturl) | |
def _shorturl(self, url): | |
if len(url) < 18: | |
return None |