blob: 434a1f809661c5e8cb1fa43eac4babb0dd8224f8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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!')
|