Skip to content

Commit ac1a45b

Browse files
committed
Add option to disable reply pings.
1 parent af0f89f commit ac1a45b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cloudbot/event.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ def reply(self, *messages, target=None):
240240
:type message: str
241241
:type target: str
242242
"""
243+
reply_ping = self.conn.config.get("reply_ping", True)
243244
if target is None:
244245
if self.chan is None:
245246
raise ValueError("Target must be specified when chan is not assigned")
@@ -248,7 +249,7 @@ def reply(self, *messages, target=None):
248249
if not messages: # if there are no messages specified, don't do anything
249250
return
250251

251-
if target == self.nick:
252+
if target == self.nick or not reply_ping:
252253
self.conn.message(target, *messages)
253254
else:
254255
self.conn.message(target, "({}) {}".format(self.nick, messages[0]), *messages[1:])

0 commit comments

Comments
 (0)