Skip to content

Instantly share code, notes, and snippets.

@omnidan
Created July 25, 2014 16:51
Show Gist options
  • Save omnidan/45aa60acfdff6bab8c14 to your computer and use it in GitHub Desktop.
Save omnidan/45aa60acfdff6bab8c14 to your computer and use it in GitHub Desktop.
PyBorg: Always reply on highlight
Subject: [PATCH] always reply to highlight
---
lib/pyborg/pyborg-irc.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/pyborg/pyborg-irc.py b/lib/pyborg/pyborg-irc.py
index 8b8e715..7e1ec25 100755
--- a/lib/pyborg/pyborg-irc.py
+++ b/lib/pyborg/pyborg-irc.py
@@ -324,9 +324,9 @@ class ModIRC(SingleServerIRCBot):
# We want replies reply_chance%, if speaking is on
replyrate = self.settings.speaking * self.settings.reply_chance
- # double reply chance if the text contains our nickname :-)
+ # always reply if the text contains our nickname :-)
if body.lower().find(self.settings.myname.lower()) != -1:
- replyrate = replyrate * 2
+ replyrate = 100
# Always reply to private messages
if e.eventtype() == "privmsg":
--
1.8.5.2 (Apple Git-48)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment