diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-05-20 21:40:40 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-05-20 21:40:40 +0200 |
commit | 3ad64f57384505da2f25e1778f6afb7414c67ff5 (patch) | |
tree | bd435ac5f49d78430147086b8bf52d85b99b4308 | |
parent | f271ff14104083c0cd0d711ba8a33ece806926ae (diff) |
Fix m.reply() regexp check for nick presence, which failed for nicks such as unfo- or jsn-
-rw-r--r-- | lib/rbot/message.rb | 2 |
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) |