summaryrefslogtreecommitdiff
path: root/rbot/plugins/opmeh.rb
blob: 08227925cbd31ca9a7be87749c470f183c7896d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class OpMehPlugin < Plugin

  def help(plugin, topic="")
    return "opmeh <channel> => grant user ops in <channel>"
  end

  def privmsg(m)
    unless(m.params)
      m.reply "usage: " + help(m.plugin)
      return
    end
    target = m.sourcenick
    channel = m.params
    @bot.sendq("MODE #{channel} +o #{target}")
  end
end
plugin = OpMehPlugin.new
plugin.register("opmeh")