summaryrefslogtreecommitdiff
path: root/rbot/plugins/opmeh.rb
blob: eb39251341797c4264f22aef9de194812bcb16b7 (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)
    if(m.params)
      channel = m.params
    else
      channel = m.channel
    end
    target = m.sourcenick
    @bot.sendq("MODE #{channel} +o #{target}")
  end
end
plugin = OpMehPlugin.new
plugin.register("opmeh")