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