]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/message.rb
* autoflush $stdout in setup wizard
[user/henk/code/ruby/rbot.git] / lib / rbot / message.rb
index 670051ed35c1361b68719cd61e74b96958161dfc..99f4bb7f1b09ec3e10c84064c5788ed809fe1b45 100644 (file)
@@ -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)