20 lines
929 B
Python
20 lines
929 B
Python
from core.command_service import CommandService
|
|
from core.decorators import instance
|
|
|
|
|
|
@instance(name="command_service", override=True)
|
|
class CustomCommandService(CommandService):
|
|
def inject(self, registry):
|
|
super().inject(registry)
|
|
|
|
def handle_unknown_command(self, command_str: str, command_args, channel, sender, reply):
|
|
if command_str.startswith('agcr'):
|
|
return
|
|
else:
|
|
self.relay_hub_service.send_message("access_denied_logger", sender,
|
|
f"[UNKNOWN] {sender.name}: {command_str} {command_args}",
|
|
f"[UNKNOWN] {sender.name}: {command_str} {command_args}")
|
|
if sender.access_level["label"] != "all":
|
|
self.bot.send_mass_message(sender.char_id,
|
|
self.getresp("global", "unknown_command", {"cmd": command_str}))
|