Added a setting to disable ctcp responses

This commit is contained in:
jesopo 2018-08-08 13:41:25 +01:00
parent 2e9ce67586
commit fda3d65d53

View file

@ -8,6 +8,7 @@ class Module(object):
def private_message(self, event): def private_message(self, event):
if event["message"][0] == "\x01" and event["message"][-1] == "\x01": if event["message"][0] == "\x01" and event["message"][-1] == "\x01":
if event["server"].get_setting("ctcp-responses", True):
ctcp_command = event["message_split"][0][1:].upper() ctcp_command = event["message_split"][0][1:].upper()
if ctcp_command.endswith("\x01"): if ctcp_command.endswith("\x01"):
ctcp_command = ctcp_command[:-1] ctcp_command = ctcp_command[:-1]