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