From 3ad64f57384505da2f25e1778f6afb7414c67ff5 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Tue, 20 May 2008 21:40:40 +0200 Subject: Fix m.reply() regexp check for nick presence, which failed for nicks such as unfo- or jsn- --- lib/rbot/message.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rbot') 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) -- cgit v1.2.3