]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
lart plugin: replace "me" with sourcenick
authorjesse keys <jesse@teranetworks.de>
Thu, 14 Feb 2008 00:38:07 +0000 (01:38 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 14 Feb 2008 00:56:13 +0000 (01:56 +0100)
data/rbot/plugins/lart.rb

index 657537f0ed6644e7bc847b2bb4504a22326dc024..0e995efb114ff2928f5dbc09cd3863b53656ceb2 100644 (file)
@@ -95,6 +95,9 @@ class LartPlugin < Plugin
     end
     who = params[:who].to_s
     reason = params[:why]
+    if who == "me"
+      who = m.sourcenick
+    end
     if who == @bot.nick
       who = m.sourcenick
       reason = "for trying to make me lart myself"
@@ -113,7 +116,8 @@ class LartPlugin < Plugin
     end
     who = params[:who].to_s
     reason = params[:why]
-    if who == m.sourcenick
+    if who == m.sourcenick || who == "me"
+      params[:who] = m.sourcenick
       params[:why] = "for praising himself"
       handle_lart(m, params)
       return