]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/opme.rb
Fix the "list" function. Now counts the pages correctly.
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / opme.rb
index aad388a9ad8426cd940db0831c0b41181eb051b0..3df3d0d111b885c1fded47ce0964d6e9749ea020 100644 (file)
@@ -1,19 +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
+class OpMePlugin < Plugin
+
+  def help(plugin, topic="")
+    return "opme <channel> => grant user ops in <channel>"
+  end
+
+  def privmsg(m)
+    if(m.params)
+      channel = m.params
+    else
+      channel = m.channel
+    end
+    target = m.sourcenick
+    m.okay
+    @bot.sendq("MODE #{channel} +o #{target}")
+  end
+end
+plugin = OpMePlugin.new
+plugin.register("opme")