summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-08-10 22:04:58 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-08-10 22:04:58 +0000
commit1a8637103406b0c4b6c49939dbf22474d18ed888 (patch)
treecf0a993708f076efbda1ca49eee6fb0c1236599c
parent5c6616ad424a41a76e934cfaa4e47fcb2e7cbb50 (diff)
Adapt AutoOp plugin to the new IRC framework
-rw-r--r--ChangeLog4
-rw-r--r--data/rbot/plugins/autoop.rb6
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 8cbe2a1f..1b65ce95 100644
--- 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
diff --git a/data/rbot/plugins/autoop.rb b/data/rbot/plugins/autoop.rb
index cc1e11a9..5f416e41 100644
--- a/data/rbot/plugins/autoop.rb
+++ b/data/rbot/plugins/autoop.rb
@@ -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
}