]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blob - data/rbot/plugins/opmeh.rb
aad388a9ad8426cd940db0831c0b41181eb051b0
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / opmeh.rb
1 class OpMePlugin < Plugin\r
2 \r
3   def help(plugin, topic="")\r
4     return "opme <channel> => grant user ops in <channel>"\r
5   end\r
6 \r
7   def privmsg(m)\r
8     if(m.params)\r
9       channel = m.params\r
10     else\r
11       channel = m.channel\r
12     end\r
13     target = m.sourcenick\r
14     @bot.sendq("MODE #{channel} +o #{target}")\r
15     m.okay\r
16   end\r
17 end\r
18 plugin = OpMePlugin.new\r
19 plugin.register("opme")\r