From bca160cbbf64aeb56fb6729f2ea4d77e5821a31c Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Mon, 24 Jul 2006 06:50:20 +0000 Subject: [PATCH] Suppress the warnings for Struct redefinition on rescan --- data/rbot/plugins/quotes.rb | 2 +- data/rbot/plugins/roulette.rb | 2 +- data/rbot/plugins/seen.rb | 2 +- data/rbot/plugins/url.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/rbot/plugins/quotes.rb b/data/rbot/plugins/quotes.rb index 917c6901..4695fa10 100644 --- a/data/rbot/plugins/quotes.rb +++ b/data/rbot/plugins/quotes.rb @@ -1,6 +1,6 @@ # GB: Ok, we *really* need to switch to db for this plugin too -Quote = Struct.new("Quote", "num", "date", "source", "quote") +Quote = Struct.new("Quote", :num, :date, :source, :quote) unless defined?(Quote) class QuotePlugin < Plugin def initialize diff --git a/data/rbot/plugins/roulette.rb b/data/rbot/plugins/roulette.rb index e3bb25f6..85248481 100644 --- a/data/rbot/plugins/roulette.rb +++ b/data/rbot/plugins/roulette.rb @@ -1,4 +1,4 @@ -RouletteHistory = Struct.new("RouletteHistory", :games, :shots, :deaths, :misses, :wins) +RouletteHistory = Struct.new("RouletteHistory", :games, :shots, :deaths, :misses, :wins) unless defined?(RouletteHistory) class RoulettePlugin < Plugin def initialize diff --git a/data/rbot/plugins/seen.rb b/data/rbot/plugins/seen.rb index aec5a064..094a9b3d 100644 --- a/data/rbot/plugins/seen.rb +++ b/data/rbot/plugins/seen.rb @@ -1,4 +1,4 @@ -Saw = Struct.new("Saw", :nick, :time, :type, :where, :message) +Saw = Struct.new("Saw", :nick, :time, :type, :where, :message) unless defined?(Saw) class SeenPlugin < Plugin def help(plugin, topic="") diff --git a/data/rbot/plugins/url.rb b/data/rbot/plugins/url.rb index b04beb87..65d75eab 100644 --- a/data/rbot/plugins/url.rb +++ b/data/rbot/plugins/url.rb @@ -2,7 +2,7 @@ require 'net/http' require 'uri' require 'cgi' -Url = Struct.new("Url", :channel, :nick, :time, :url) +Url = Struct.new("Url", :channel, :nick, :time, :url) unless defined?(Url) TITLE_RE = /<\s*?title\s*?>(.+?)<\s*?\/title\s*?>/im UNESCAPE_TABLE = { -- 2.39.5