]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/autoop.rb
Adapt AutoOp plugin to the new IRC framework
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / autoop.rb
index cc1e11a9a16ce887681bde799a26ea2732ba9bdd..5f416e41ee31db953c4aee5871eb5c880cac506b 100644 (file)
@@ -6,9 +6,9 @@ class AutoOP < Plugin
     def join(m)
       return if m.address?
       @registry.each { |mask,channels|
-        if(Irc.netmaskmatch(mask, m.source) &&
-            (channels.empty? || channels.include?(m.channel)))
-          @bot.mode(m.channel, "+o", m.sourcenick)
+        if m.source.matches?(mask.to_irc_netmask(:server => m.server)) &&
+            (channels.empty? || channels.include?(m.channel.to_s))
+          @bot.mode(m.channel, "+o", m.source.nick)
           return
         end
       }