From eda43f1d3cb0ecd5682d5073c547d37228531c32 Mon Sep 17 00:00:00 2001 From: Georg Date: Thu, 3 Jun 2021 01:46:17 +0200 Subject: Init --- plugin.py | 317 +++++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 200 insertions(+), 117 deletions(-) (limited to 'plugin.py') diff --git a/plugin.py b/plugin.py index 9f855c3..0f5dc26 100644 --- a/plugin.py +++ b/plugin.py @@ -33,6 +33,7 @@ import secrets import string from supybot import utils, plugins, ircutils, callbacks, ircdb from supybot.commands import * +from supybot.ircmsgs import nick try: from supybot.i18n import PluginInternationalization _ = PluginInternationalization('Mailcow') @@ -41,149 +42,231 @@ except ImportError: # without the i18n module _ = lambda x: x -server = 'https://zz0.email' api = '/api/v1' get = api + '/get' -api_key = "" - -capability = ircdb.checkCapability(hostmask='cranberry!~u@cranberry.juice', capability='owner', ignoreDefaultAllow=True) - class Mailcow(callbacks.Plugin): """Mailcow API through IRC""" pass - + def maildomain(self, irc, msg, args, variant, id): - """ - i.e. 'get liberta.casa' will print infos about the respective MX zone""" + """