summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-07-24 06:50:20 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-07-24 06:50:20 +0000
commitbca160cbbf64aeb56fb6729f2ea4d77e5821a31c (patch)
tree769a63b0c1987d8a6ce475081e60488f84b14838
parent3150e83c5eb61b5c79fdb3570cb35b41aeca4626 (diff)
Suppress the warnings for Struct redefinition on rescan
-rw-r--r--data/rbot/plugins/quotes.rb2
-rw-r--r--data/rbot/plugins/roulette.rb2
-rw-r--r--data/rbot/plugins/seen.rb2
-rw-r--r--data/rbot/plugins/url.rb2
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 = {