Added a setting to disable ctcp responses
This commit is contained in:
parent
2e9ce67586
commit
fda3d65d53
1 changed files with 20 additions and 19 deletions
|
@ -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]
|
||||||
|
|
Loading…
Reference in a new issue