Simple: people want to either paste multi-line things (e.g. code) or say things that either cover multiple lines or extend past the ~512 byte cap. this spec is designed to solve all 3.
bitbot.dev/multiline
#!/usr/bin/env python3 | |
import re, select, time, urllib.request | |
import bs4, pylast | |
FILE_LOG = "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/Plex Media Server.log" | |
REGEX_STARTED = re.compile("reporting timeline state playing, progress of (\d+)/\d+ms", re.I) | |
REGEX_RATINGKEY = re.compile("metadataId=(\d+)", re.I) | |
URL_PLEX = "http://localhost:32400/status/sessions" | |
API_KEY = "627f33b81993f32254cd60d5736fcebd" |
#!/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] |
#!/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 |
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 |
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;
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.
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") |