From da753090c734a28853002a2f53c7c5e319afe865 Mon Sep 17 00:00:00 2001 From: swee Date: Tue, 21 Jan 2025 19:16:24 -0800 Subject: [PATCH] Add modules/pawserv.py --- modules/pawserv.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 modules/pawserv.py diff --git a/modules/pawserv.py b/modules/pawserv.py new file mode 100644 index 0000000..75d17bf --- /dev/null +++ b/modules/pawserv.py @@ -0,0 +1,39 @@ +# Replacement for services bots. +__ircat_type__ = "command" +__ircat_requires__ = [] +__ircat_giveme__ = ["sql"] # Only command and allsocket have these. +__ircat_fakeusers__ = { + "NickServ": { + "host": "PawServ", + "username": "Meow", + "realname": "PawServ plugin - Identification bot", + "modes": "iw", "away": False + }, + "ChanServ": { + "host": "PawServ", + "username": "Meow", + "realname": "PawServ plugin - Channel management bot", + "modes": "iw", + "away": False + } + } +class command: + def __init__(self, sql): + self.sql = sql + print("PawServ loaded!") + def command(self, command, args, ip, nick, connection, user): + try: + if command == "NICKSERV" or (command == "PRIVMSG" and args[0].lower() == "nickserv"): + if command == "PRIVMSG": + args = args[1:] + args[0] = args[0][1:] if args[0][0] == ":" + if args[0].lower() == "identify": + connection.sendall(Bytes(f":NickServ!Meow@PawServ NOTICE {nick} :Feature not implemented in PawServ plugin yet.", "UTF-8")) + elif: + connection.sendall(bytes(f":NickServ!Meow@PawServ NOTICE {nick} :NickServ Usage:\r\n","UTF-8")) + connection.sendall(bytes(f":NickServ!Meow@PawServ NOTICE {nick} :IDENTIFY pass - Identifies your nickname\r\n","UTF-8")) + return True + else: + return False + except: + return False \ No newline at end of file