X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fbash.rb;h=0524204a4f2ef549fe7d06d6b0090647f2e341b8;hb=24bb60775741d3731400f1e430ef6bf3a2e1b933;hp=4bb1378aa348fe5db5dac10c510b9c6342bbe40d;hpb=be2371b5ae7b980eb7fee1b51bbc3c93a122b686;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/bash.rb b/data/rbot/plugins/bash.rb index 4bb1378a..0524204a 100644 --- a/data/rbot/plugins/bash.rb +++ b/data/rbot/plugins/bash.rb @@ -39,7 +39,7 @@ class ::BashQuote text = String.new @text.each_line { |l| debug "line: #{l.inspect}" - cur_nick = l.match(/^\s*(<.*?>|\(.*?\)|.*?:)/)[1] rescue nil + cur_nick = l.match(/^\s*(<.*?>|\(.*?\)|.*?:)\s/)[1] rescue nil debug "nick: #{cur_nick.inspect}; last: #{last_nick.inspect}" if cur_nick and cur_nick == last_nick text << l.sub(cur_nick,"") @@ -57,7 +57,7 @@ end class BashPlugin < Plugin - BotConfig.register BotConfigEnumValue.new('bash.access', + Config.register Config::EnumValue.new('bash.access', :values => ['xml', 'html'], :default => 'html', :desc => "Which method the bot should use to access bash.org quotes: xml files or standard webpages")