From fcd3e87793f44c20c92bdadb4c12c4915b7b411e Mon Sep 17 00:00:00 2001 From: luk3yx Date: Sat, 19 Mar 2022 17:12:19 +1300 Subject: Initial public commit --- join-part.liteonly.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 join-part.liteonly.py (limited to 'join-part.liteonly.py') diff --git a/join-part.liteonly.py b/join-part.liteonly.py new file mode 100644 index 0000000..434a1f8 --- /dev/null +++ b/join-part.liteonly.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 + +@register_command('join', requires_admin=True) +def irc_join(irc, hostmask, is_admin, args): + """ Joins a channel. """ + assert is_admin + irc.send('JOIN', args[1]) + irc.notice(hostmask[0], 'Done!') + +@register_command('part', requires_admin=True) +def irc_part(irc, hostmask, is_admin, args): + """ Leaves a channel. """ + assert is_admin + irc.send('PART', args[1], f'Requested by {is_admin!r}.') + irc.notice(hostmask[0], 'Done!') -- cgit v1.2.3