]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
Adapt AutoOp plugin to the new IRC framework
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 10 Aug 2006 22:04:58 +0000 (22:04 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 10 Aug 2006 22:04:58 +0000 (22:04 +0000)
ChangeLog
data/rbot/plugins/autoop.rb

index 8cbe2a1fa00a0516b8d4dbaa8c220ba56c8bbee2..1b65ce95f54186a1c32cfdeb404bbd349648d9c8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-08-11  Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
+
+       * AutoOp plugin: adapted to the new IRC framework.
+
 2006-08-10  Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
 
        * Fix a bug in new IRC Framework: the list of channels a quitting user was
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
       }