Disable #chan in private messages

This commit is contained in:
Juhani Krekelä 2018-12-06 13:42:02 +00:00
parent 4e7d88e8e7
commit 2893f261a0
1 changed files with 2 additions and 1 deletions

View File

@ -433,7 +433,8 @@ def parse((line, irc)):
cmdline.remove('')
# #chan: channel override prefix
if matchcmd(cmdline, '#chan'):
# Don't allow this in private messages for more transparent bot usage
if matchcmd(cmdline, '#chan') and chan != nick:
if matchcmd(cmdline, '#chan', 'channel {command}'):
newchan, newcmdline = parsecmd(cmdline, 'channel {command}')
newcmdline = newcmdline.split(' ')