Skip to content

Commit

Permalink
Allow guest DJs to set Hanyuu as DJ
Browse files Browse the repository at this point in the history
This will let guest DJs stop streaming
without waiting for someone with access
to be available
  • Loading branch information
Kethsar committed Aug 27, 2017
1 parent 97da1d3 commit e3b0db3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bot/hanyuu_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,10 @@ def dj(server, nick, channel, text, hostmask):
tokens = text.split(' ')
new_dj = " ".join(tokens[1:])
if new_dj != '':
if server.hasaccess(channel, nick):
is_guest_dj = re.match("guest:{0}$".format(nick), manager.DJ().name, re.I)
if server.hasaccess(channel, nick) or is_guest_dj:
if is_guest_dj:
new_dj = 'Hanyuu-sama'
if new_dj:
if new_dj == 'None':
new_status = 'DOWN'
Expand Down

0 comments on commit e3b0db3

Please sign in to comment.