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

  def help(plugin, topic="")
    return "opme <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}")
    m.okay
  end
end
plugin = OpMePlugin.new
plugin.register("opme")