X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fbotsnack.rb;h=d3097d1b6e026783fe16cdf1cba77e0b3d8eda69;hb=052217de30c59206d7025b582d4604557a747470;hp=b391bb9643f92894c4376e3402539e45baea967b;hpb=f271ff14104083c0cd0d711ba8a33ece806926ae;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/botsnack.rb b/data/rbot/plugins/botsnack.rb index b391bb96..d3097d1b 100644 --- a/data/rbot/plugins/botsnack.rb +++ b/data/rbot/plugins/botsnack.rb @@ -2,7 +2,7 @@ #++ # # :title: botsnack - give your bot some love -# :version: 1.0 +# :version: 1.0a # # Author:: Jan Wikholm # @@ -18,20 +18,16 @@ class BotsnackPlugin < Plugin def help(plugin, topic="") - "botsnack => reward #{@nick} for being good" + "botsnack => reward #{@bot.nick} for being good" end def snack(m, params) - # Below is the 0.9.10 version, but I changed it because it would conflict - # with config params [core.reply_with_nick true] and [core.nick_postfix ,] - # resulting in: - # <@unfo-> .botsnack - # <@rrBot> unfo-, unfo-: thanks :) - # OLD: m.reply @bot.lang.get("thanks_X") % m.sourcenick if(m.public?) - # OLD: m.reply @bot.lang.get("thanks") if(m.private?) - - m.reply @bot.lang.get("thanks") + if m.public? + m.reply @bot.lang.get("thanks_X") % m.sourcenick + else + m.reply @bot.lang.get("thanks") + end end end