@bot.kick channel, user, reason
to kick a user from a channel
* RSS plugin: fix rewatch_rss method
+ * RSS plugin: the different ways to represent channels before and
+ after the New IRC Framework was causing strange problems such as
+ watched feed not being listed as such, undeletable watches, double
+ watches etc. Fix this by checking both for the Channel objects and
+ their to_s form when checking for watches or deleting them.
-2006-08-06 Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
+2006-08-06 Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
* Updating the ChangeLog again: describe the new stuff in trunk which
will be made available in the next release. Use Gnu style for new
+#-- vim:sw=2:et\r
+#++\r
+#\r
# RSS feed plugin for RubyBot\r
# (c) 2004 Stanislav Karchebny <berkus@madfire.net>\r
# (c) 2005 Ian Monroe <ian@monroe.nu>\r
# (c) 2005 Mark Kretschmann <markey@web.de>\r
+# (c) 2006 Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\r
+#\r
# Licensed under MIT License.\r
\r
require 'rss/parser'\r
end\r
\r
def watched_by?(who)\r
- @watchers.include?(who)\r
+ # We need to check bot 'who' itself and the String form, because rss\r
+ # watches added before the new Irc framework represented watchers as\r
+ # Strings whereas they are now Channels.\r
+ #\r
+ @watchers.include?(who) || @watchers.include?(who.to_s) \r
end\r
\r
def add_watch(who)\r
if watched_by?(who)\r
return nil\r
end\r
- @watchers << who unless watched_by?(who)\r
+ @watchers << who\r
return who\r
end\r
\r
def rm_watch(who)\r
+ # See comment to watched_by?\r
+ #\r
@watchers.delete(who)\r
+ @watchers.delete(who.to_s)\r
end\r
\r
def to_a\r