From 50f788a5d0d79f153be92bae113289a042f37c7f Mon Sep 17 00:00:00 2001 From: dsc Date: Thu, 17 Jun 2021 04:41:29 +0200 Subject: [PATCH] enforce prefix --- ircradio/irc.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ircradio/irc.py b/ircradio/irc.py index 257f062..cb4997e 100644 --- a/ircradio/irc.py +++ b/ircradio/irc.py @@ -339,8 +339,10 @@ async def message(nick, target, message, **kwargs): target = nick msg = message - if msg.startswith(settings.irc_command_prefix): - msg = msg[len(settings.irc_command_prefix):] + if not msg.startswith(settings.irc_command_prefix): + return + + msg = msg[len(settings.irc_command_prefix):] try: if nick not in settings.irc_admins_nicknames: