]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
rename to opme
authorTom Gilbert <tom@linuxbrit.co.uk>
Fri, 29 Jul 2005 11:14:12 +0000 (11:14 +0000)
committerTom Gilbert <tom@linuxbrit.co.uk>
Fri, 29 Jul 2005 11:14:12 +0000 (11:14 +0000)
data/rbot/plugins/opme.rb [new file with mode: 0644]

diff --git a/data/rbot/plugins/opme.rb b/data/rbot/plugins/opme.rb
new file mode 100644 (file)
index 0000000..aad388a
--- /dev/null
@@ -0,0 +1,19 @@
+class OpMePlugin < Plugin\r
+\r
+  def help(plugin, topic="")\r
+    return "opme <channel> => grant user ops in <channel>"\r
+  end\r
+\r
+  def privmsg(m)\r
+    if(m.params)\r
+      channel = m.params\r
+    else\r
+      channel = m.channel\r
+    end\r
+    target = m.sourcenick\r
+    @bot.sendq("MODE #{channel} +o #{target}")\r
+    m.okay\r
+  end\r
+end\r
+plugin = OpMePlugin.new\r
+plugin.register("opme")\r