summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/opme.rb
blob: 3df3d0d111b885c1fded47ce0964d6e9749ea020 (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
    m.okay
    @bot.sendq("MODE #{channel} +o #{target}")
  end
end
plugin = OpMePlugin.new
plugin.register("opme")