X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fopme.rb;h=3df3d0d111b885c1fded47ce0964d6e9749ea020;hb=b04c756e064cafc1ed06225a17a44d19f349f06b;hp=aad388a9ad8426cd940db0831c0b41181eb051b0;hpb=438d56ceb82755961229d222d82a1c22ce04ab1d;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/opme.rb b/data/rbot/plugins/opme.rb index aad388a9..3df3d0d1 100644 --- a/data/rbot/plugins/opme.rb +++ b/data/rbot/plugins/opme.rb @@ -1,19 +1,19 @@ -class OpMePlugin < Plugin - - def help(plugin, topic="") - return "opme => grant user ops in " - 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") +class OpMePlugin < Plugin + + def help(plugin, topic="") + return "opme => grant user ops in " + 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")