diff options
author | luk3yx <luk3yx@users.noreply.github.com> | 2022-03-19 17:12:19 +1300 |
---|---|---|
committer | luk3yx <luk3yx@users.noreply.github.com> | 2022-03-19 17:12:19 +1300 |
commit | fcd3e87793f44c20c92bdadb4c12c4915b7b411e (patch) | |
tree | db08580af3351d9ec18ba92f94dd120056101fb5 /join-part.liteonly.py | |
download | lurklite-commands-fcd3e87793f44c20c92bdadb4c12c4915b7b411e.tar.gz lurklite-commands-fcd3e87793f44c20c92bdadb4c12c4915b7b411e.zip |
Initial public commit
Diffstat (limited to 'join-part.liteonly.py')
-rw-r--r-- | join-part.liteonly.py | 15 |
1 files changed, 15 insertions, 0 deletions
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!') |