summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-05-20 21:40:40 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-05-20 21:40:40 +0200
commit3ad64f57384505da2f25e1778f6afb7414c67ff5 (patch)
treebd435ac5f49d78430147086b8bf52d85b99b4308
parentf271ff14104083c0cd0d711ba8a33ece806926ae (diff)
Fix m.reply() regexp check for nick presence, which failed for nicks such as unfo- or jsn-
-rw-r--r--lib/rbot/message.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rbot/message.rb b/lib/rbot/message.rb
index 670051ed..99f4bb7f 100644
--- a/lib/rbot/message.rb
+++ b/lib/rbot/message.rb
@@ -348,7 +348,7 @@ module Irc
# the nick or core.reply_with_nick is set to false
#
def reply(string, options={})
- if @bot.config['core.reply_with_nick'] and not string =~ /\b#{Regexp.escape(@source.to_s)}\b/
+ if @bot.config['core.reply_with_nick'] and not string =~ /(?:^|\W)#{Regexp.escape(@source.to_s)}(?:$|\W)/
return nickreply(string, options)
end
plainreply(string, options)