1 class OpPlugin < Plugin
3 def help(plugin, topic="")
4 return "op [<user>] [<channel>] => grant <user> (if ommitted yourself) ops in <channel> (or in the current channel if no channel is specified)"
8 channel = params[:channel]
12 target = user.nil? ? "you" : user
13 m.reply "You should tell me where you want me to op #{target}."
16 channel = m.channel.to_s
23 m.okay unless channel == m.channel.to_s
24 @bot.sendq("MODE #{channel} +o #{user}")
28 params[:user] = m.sourcenick
35 plugin.map("op [:user] [:channel]")
36 plugin.map("opme [:channel]") # For backwards compatibility with 0.9.10
37 plugin.default_auth("*",false)