]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
remove whitespace
authorRaine Virta <rane@kapsi.fi>
Thu, 19 Feb 2009 14:26:34 +0000 (16:26 +0200)
committerRaine Virta <rane@kapsi.fi>
Thu, 19 Feb 2009 14:26:34 +0000 (16:26 +0200)
68 files changed:
data/rbot/contrib/plugins/stats.rb
data/rbot/contrib/plugins/vandale.rb
data/rbot/plugins/alias.rb
data/rbot/plugins/bans.rb
data/rbot/plugins/bash.rb
data/rbot/plugins/cal.rb
data/rbot/plugins/chucknorris.rb
data/rbot/plugins/deepthoughts.rb
data/rbot/plugins/dictclient.rb
data/rbot/plugins/digg.rb
data/rbot/plugins/fish.rb
data/rbot/plugins/forecast.rb
data/rbot/plugins/fortune.rb
data/rbot/plugins/freshmeat.rb
data/rbot/plugins/games/azgame.rb
data/rbot/plugins/games/quiz.rb
data/rbot/plugins/games/roshambo.rb
data/rbot/plugins/games/roulette.rb
data/rbot/plugins/games/shiritori.rb
data/rbot/plugins/games/uno.rb
data/rbot/plugins/googlefight.rb
data/rbot/plugins/imdb.rb
data/rbot/plugins/insult.rb
data/rbot/plugins/karma.rb
data/rbot/plugins/linkbot.rb
data/rbot/plugins/markov.rb
data/rbot/plugins/math.rb
data/rbot/plugins/modes.rb
data/rbot/plugins/nickrecover.rb
data/rbot/plugins/nickserv.rb
data/rbot/plugins/nslookup.rb
data/rbot/plugins/quakeauth.rb
data/rbot/plugins/quotes.rb
data/rbot/plugins/reaction.rb
data/rbot/plugins/remind.rb
data/rbot/plugins/ri.rb
data/rbot/plugins/rss.rb
data/rbot/plugins/salut.rb
data/rbot/plugins/script.rb
data/rbot/plugins/search.rb
data/rbot/plugins/seen.rb
data/rbot/plugins/shortenurls.rb
data/rbot/plugins/slashdot.rb
data/rbot/plugins/theyfightcrime.rb
data/rbot/plugins/time.rb
data/rbot/plugins/translator.rb
data/rbot/plugins/tube.rb
data/rbot/plugins/weather.rb
data/rbot/plugins/wserver.rb
lib/rbot/botuser.rb
lib/rbot/core/basics.rb
lib/rbot/core/filters_ui.rb
lib/rbot/core/irclog.rb
lib/rbot/core/remote.rb
lib/rbot/core/userdata.rb
lib/rbot/core/utils/httputil.rb
lib/rbot/core/utils/utils.rb
lib/rbot/dbhash.rb
lib/rbot/irc.rb
lib/rbot/language.rb
lib/rbot/message.rb
lib/rbot/messagemapper.rb
lib/rbot/plugins.rb
lib/rbot/timer.rb
msgmerge-wrapper.rb
setup.rb
test/test_plugins_priority.rb
test/test_plugins_threshold.rb

index 4cafbbe973c848605fdbdc8bc882ef26feb3c5cd..97f42bd3e5f1d1f018349c905d5c014ad9e738b7 100644 (file)
 
 class StatsPlugin < Plugin
 
-       @@commands = { 
+       @@commands = {
                "stats" => "handle_stats",
                "track" => "handle_track",
-               "untrack" => "handle_untrack", 
+               "untrack" => "handle_untrack",
                "listtokens" => "handle_listtokens",
                "rmabuser" => "handle_rmabuser"
        }
@@ -61,7 +61,7 @@ class StatsPlugin < Plugin
                        m.reply "What a crazy fool!  Did you mean |help stats?"
                        return
                end
-               
+
                meth = self.method(@@commands[m.plugin])
                meth.call(m)
        end
index 7b806c85f0861b8f76ccdcd09d7a5c8f54e158fa..720fe762cbdde9e7b0fc61ebd5522749b04e7ae0 100644 (file)
@@ -16,7 +16,7 @@ class VanDalePlugin < Plugin
                ret = Array.new
                Utils.safe_exec("/usr/local/bin/gnuvd", m.params).each{|line| if line.length > 5 then ret << line end}
                m.reply ret.delete_at(0)
-               while ret[0] =~ /^[[:alpha:]_]*[0-9]/ 
+               while ret[0] =~ /^[[:alpha:]_]*[0-9]/
                        m.reply ret.delete_at(0)
                end
                while ret[0] =~ /^[0-9]/
index 58d0ef01a0831639f03dd98b8aaf06064e2519b2..89be0020434b81e1593a40d573aa77db6a80592e 100644 (file)
@@ -58,10 +58,10 @@ class AliasPlugin < Plugin
        warning _("Invalid alias entry %{alias} : %{command} in %{filename}: %{reason}") %
                 {:alias => a, :command => c, :filename => @data_file, :reason => $1}
       end
-    end 
-  end 
+    end
+  end
 
-  def save 
+  def save
     FileUtils.mkdir_p(@data_path)
     Utils.safe_save(@data_file) {|f| f.write @aliases.to_yaml}
   end
@@ -110,7 +110,7 @@ class AliasPlugin < Plugin
     command.scan(/<(\w+)>/).flatten.to_set ==
       text.split.grep(/\A[:*](\w+)\Z/) {$1}.to_set or
       raise AliasDefinitionError.new(_('The arguments in alias must match the substitutions in command, and vice versa'))
-    
+
     begin
       map text, :action => :"alias_handle<#{text}>", :auth_path => 'run'
     rescue
index f80dd70f9fed91b1219461954d804acecb4b549b..99b664dfd91b04c641a6c30ca0d6640dd5d79d16 100644 (file)
@@ -458,7 +458,7 @@ class BansPlugin < Plugin
     when /^(\d+)m$/
       timer = $1.to_i * 60
     when /^(\d+)h$/
-      timer = $1.to_i * 60 * 60 
+      timer = $1.to_i * 60 * 60
     when /^(\d+)d$/
       timer = $1.to_i * 60 * 60 * 24
     else
index 16028356c5df200bd455d5d5551105f2ee3a9f8b..8dac9671792b7b1c2e0375a751674464aac799ab 100644 (file)
@@ -172,7 +172,7 @@ class BashPlugin < Plugin
       xml = @bot.httputil.get("http://bash.org/xml/?random&num=1", :cache => false)
     else
       xml = @bot.httputil.get("http://bash.org/xml/?" + id + "&num=1")
-    end        
+    end
 
     unless xml
       m.reply "bash.org rss parse failed"
@@ -184,7 +184,7 @@ class BashPlugin < Plugin
       return
     end
     doc.elements.each("*/item") {|e|
-      if(id != 0) 
+      if(id != 0)
         reply = e.elements["title"].text.gsub(/QDB: /,"") + " " + e.elements["link"].text.gsub(/QDB: /,"") + "\n"
         reply = reply + e.elements["description"].text.gsub(/\<br \/\>/, "\n")
       else
index 9190f8e9dbbefb8f10149fa11c0e8c254c8bbf72..c649084a14394df93cc2306b7f9df11bce0d22b1 100644 (file)
@@ -6,7 +6,7 @@ class CalPlugin < Plugin
   def help(plugin, topic="")
     "cal [month year] => show current calendar [optionally specify month and year]"
   end
-  
+
   def cal_path
     @bot.config["cal.path"]
   end
index bf9d70f46827816a7f57941c1d9d365c2c85a8d6..6b6c4f985ac0116e29a45d85ea1492eacd65ba33 100644 (file)
@@ -16,20 +16,20 @@ class ChuckNorrisPlugin < Plugin
     else
       raise "Error: Couldn't find chucknorris.yml[.gz]"
     end
-    
+
     debug "+ [chucknorris] Loading #{path}..."
-    
+
     @@facts = YAML.load(fyml).map{|fact,(score,votes)| votes >= MIN_VOTES ? [score,fact] : nil}.compact
     debug "+ [chucknorris] #{@@facts.length} Chuck Norris facts loaded..."
     debug "  Random fact: #{@@facts[rand(@@facts.size)].inspect}"
-    
+
     super
   end
 
   def name
     "chucknorris"
   end
-  
+
   # Just a little helper for the initialize method...
   def find_facts_file(name)
     full_path = File.join Config::datadir, "plugins", name
@@ -40,11 +40,11 @@ class ChuckNorrisPlugin < Plugin
       found_files[0]
     end
   end
-  
+
   # HELP!
   def help(plugin, topic="chuck")
     "chuck|norris|chucknorris [min_rating] => show a random Chuck Norris fact (optional minimum rating from 1-10, default=6.0)."
-    #\"fact [person]\" shows a fact about someone in the channel. 
+    #\"fact [person]\" shows a fact about someone in the channel.
   end
 
   # The meat.
index b1171bae8e82db5efcb5be2481335366fe74d9b6..a6b4e80f657fa1f664b9d6efaaf09d1b7f2f1199 100644 (file)
@@ -79,7 +79,7 @@ class DeepThoughts < Plugin
     def help(plugin, topic="")
         "deepthought => think a deep thought."
     end
-    
+
     def deepthought(m, params)
         m.reply THOUGHTS.pick_one
     end
index 5b3bc6314ad47469bb1d268fb845bb5ef23cb329..d7e5091c3600d804fb3c1cf5d65e2acdb1526585 100644 (file)
@@ -77,11 +77,11 @@ class DictClientPlugin < Plugin
   Config.register Config::StringValue.new('dictclient.match_format',
     :default => '<matches>––<database>',
     :desc => _('Format of match results. <matches> will be replaced with the formatted headwords, <database> with the formatted database name'))
-  
+
   def initialize
     super
   end
-  
+
   # create a DICT object, which is passed to the block. after the block finishes,
   # the DICT object is automatically disconnected. the return value of the block
   # is returned from this method.
@@ -104,15 +104,15 @@ class DictClientPlugin < Plugin
     end
     ret
   end
-  
+
   def format_headword(w)
     @bot.config['dictclient.headword_format'].gsub '<headword>', w
   end
-    
+
   def format_database(d)
     @bot.config['dictclient.database_format'].gsub '<database>', d
   end
-  
+
   def cmd_define(m, params)
     phrase = params[:phrase].to_s
     results = with_dict(m) {|d| d.define(params[:database], params[:phrase])}
@@ -122,7 +122,7 @@ class DictClientPlugin < Plugin
         # the number of definitions is above dictclient.max_defs_before_collapse
         if results.any? {|r| r.database != results[0].database} &&
            results.length > @bot.config['dictclient.max_defs_before_collapse']
-          _("Many definitions for %{phrase} were found in %{databases}. Use 'define <phrase> from <database> to view a definition.") % 
+          _("Many definitions for %{phrase} were found in %{databases}. Use 'define <phrase> from <database> to view a definition.") %
           { :phrase => format_headword(phrase),
             :databases => results.collect {|r| r.database}.uniq.
                                   collect {|d| format_database d}.join(', ') }
@@ -139,13 +139,13 @@ class DictClientPlugin < Plugin
           }.join ' | '
         end
       else
-        _("No definition for %{phrase} found from %{database}.") % 
+        _("No definition for %{phrase} found from %{database}.") %
           { :phrase => format_headword(phrase),
             :database => format_database(params[:database]) }
       end
     )
   end
-  
+
   def cmd_match(m, params)
     phrase = params[:phrase].to_s
     results = with_dict(m) {|d| d.match(params[:database],
@@ -160,14 +160,14 @@ class DictClientPlugin < Plugin
           )
         }.join ' '
       else
-        _("Nothing matched %{query} from %{database} using %{strategy}") % 
+        _("Nothing matched %{query} from %{database} using %{strategy}") %
         { :query => format_headword(phrase),
           :database => format_database(params[:database]),
           :strategy => params[:strategy] }
       end
     )
   end
-    
+
   def cmd_databases(m, params)
     with_dict(m) do |d|
       m.reply _("Databases: %{list}") % {
@@ -175,7 +175,7 @@ class DictClientPlugin < Plugin
       }
     end
   end
-  
+
   def cmd_strategies(m, params)
     with_dict(m) do |d|
       m.reply _("Strategies: %{list}") % {
@@ -183,7 +183,7 @@ class DictClientPlugin < Plugin
       }
     end
   end
-    
+
   def help(plugin, topic='')
     case topic
     when 'define'
index dc2e41cfcc32b71179c21d9774cb7386447026f6..259629196d6368496253ad04755102e3faa36585 100644 (file)
@@ -9,7 +9,7 @@ class DiggPlugin < Plugin
   def help(plugin, topic="")
     "digg [<max>=5] => show digg headlines, [<max>=5] => return up to <max> headlines (use a negative number to show all the headlines on one line)"
   end
-  
+
   def digg(m, params)
     max = params[:limit].to_i
     debug "max is #{max}"
@@ -32,11 +32,11 @@ class DiggPlugin < Plugin
     max = 8 if max > 8
     matches = Array.new
     doc.elements.each("rss/channel/item") {|e|
-      matches << [ e.elements["title"].text, 
+      matches << [ e.elements["title"].text,
                    Time.parse(e.elements["pubDate"].text).strftime('%a @ %I:%M%p') ]
       done += 1
       break if done >= max
-    } 
+    }
     if oneline
       m.reply matches.collect{|mat| mat[0]}.join(" | ")
     else
index 5b24d2417f5fb71403a2cd1231787446de8d288b..2394fa098f7186a64917924e7d7cb2bd2db80610 100644 (file)
@@ -25,7 +25,7 @@ class BabelPlugin < Plugin
     trans_from = params[:fromlang] ? params[:fromlang] : @bot.config['translate.default_from']
     trans_to = params[:tolang] ? params[:tolang] : @bot.config['translate.default_to']
     trans_text = params[:phrase].to_s
-    
+
     lang_match = langs.join("|")
     unless(trans_from =~ /^(#{lang_match})$/ && trans_to =~ /^(#{lang_match})$/)
       m.reply "invalid language: valid languagess are: #{langs.join(' ')}"
index 1095886f3b46ac28036f5d922b4131485137b83f..293c7c057fb0a4c99faaf848b29ab0ee60f1bdbf 100644 (file)
@@ -8,7 +8,7 @@
 
 require 'soap/wsdlDriver'
 # TODO why not use HttpUtil instead of open-uri?
-require 'open-uri' 
+require 'open-uri'
 require 'rexml/document'
 require 'erb'
 
@@ -48,7 +48,7 @@ class Forecast
         return parse(retrieve),Time.new
     end
 private
-    def retrieve 
+    def retrieve
         forecast = @forecaster.NDFDgenByDay(
             @lat,@long,Time.now.strftime("%Y-%m-%d"),2,"24 hourly")
         (REXML::Document.new(forecast)).root
@@ -105,7 +105,7 @@ class ForecastPlugin < Plugin
             end
         end
     end
-    
+
     def get_forecast(m,loc)
       begin
         @cache_mutex.synchronize do
index 6612c11190f3554ec110feb175f1f9ba1ae2c1e2..3e2ffdf719a7b7dbd1cfa729bc280c0d1cb3fb7e 100644 (file)
@@ -31,7 +31,7 @@ class FortunePlugin < Plugin
     end
 
     return nil unless fortune
-      
+
     # Try setting the config entry
     config_par = {:key => 'fortune.path', :value => [fortune], :silent => true }
     debug "Setting fortune.path to #{fortune}"
@@ -94,7 +94,7 @@ class FortunePlugin < Plugin
     ## say 'em!
     m.reply "Fortune categories: #{categories.join ', '}"
   end
+
 end
 plugin = FortunePlugin.new
 plugin.map 'fortune categories', :action => "categories"
index dce6c0d495678bf0ab5351ac68606fa0d2fdce95..3ae887d1714d6fe0a43efdb8db7e74c8c0027986 100644 (file)
@@ -88,7 +88,7 @@ class FreshmeatPlugin < Plugin
       m.reply reply
     }
   end
-  
+
   def freshmeat(m, params)
     max = params[:limit].to_i
     max = 8 if max > 8
@@ -134,5 +134,5 @@ end
 plugin = FreshmeatPlugin.new
 plugin.map 'freshmeat search :limit *search', :action => 'search_freshmeat',
             :defaults => {:limit => 4}, :requirements => {:limit => /^\d+$/}
-plugin.map 'freshmeat :limit', :defaults => {:limit => 4}, 
+plugin.map 'freshmeat :limit', :defaults => {:limit => 4},
                                :requirements => {:limit => /^\d+$/}
index 6e2526e2718a6306a381815114be4b4e5a29b393..572684d912d68c1fc1d5ae2ea8faa16f666b3deb 100644 (file)
@@ -355,10 +355,10 @@ class AzGamePlugin < Plugin
       if wc[word].key?(:when)
         tr = _("%{word} learned from %{user} on %{date}") % {:word => word, :user => wc[word][:who], :date => wc[word][:when]}
       else
-        tr = _("%{word} learned from %{user}") % {:word => word, :user => wc[word][:who]} 
+        tr = _("%{word} learned from %{user}") % {:word => word, :user => wc[word][:who]}
       end
       m.reply tr
-    when :delete 
+    when :delete
       if pars.empty?
         m.reply _("provide a word")
         return
index 9159a4c4fef333b5fca3dd252288d8ec313b4e75..ca2abf470948427dec7de7603c5b17c855d7b152 100644 (file)
@@ -184,7 +184,7 @@ class QuizPlugin < Plugin
   # (in quiz/) or web pages.
   #
   def fetch_data( m )
-    # Read the winning messages file 
+    # Read the winning messages file
     @win_messages = Array.new
     winfile = datafile 'win_messages'
     if File.exists? winfile
@@ -339,7 +339,7 @@ class QuizPlugin < Plugin
         end
       end
 
-      # If less than all other players' scores, append to table 
+      # If less than all other players' scores, append to table
       unless inserted
         i += 1 unless q.rank_table.empty?
         q.rank_table << [nick, stats]
@@ -370,7 +370,7 @@ class QuizPlugin < Plugin
 
     message = m.message.downcase.strip
 
-    nick = m.sourcenick.to_s 
+    nick = m.sourcenick.to_s
 
     # Support multiple alternate answers and cores
     answer = q.answers.find { |ans| ans.valid?(message) }
index 033386986618b338e1ce88ccdb4a905b339261eb..927b2f0871d31e777f86f3f0cb7d3bc8f4155b19 100644 (file)
@@ -15,7 +15,7 @@ require 'time'
 class RoshamboPlugin < Plugin
 
   def initialize
-    super 
+    super
     @scoreboard = {}
     @beats = { :rock => :scissors, :paper => :rock, :scissors => :paper}
     @plays = @beats.keys
index adf755fdaa7a8f9bf97cc3eba71359689b6715e0..6d8347888cf52c94b2bba658697a5b21eb9d6b7e 100644 (file)
@@ -2,13 +2,13 @@ define_structure :RouletteHistory, :games, :shots, :deaths, :misses, :wins
 
 class RoulettePlugin < Plugin
   Config.register Config::BooleanValue.new('roulette.autospin',
-    :default => true, 
+    :default => true,
     :desc => "Automatically spins the roulette at the butlast shot")
   Config.register Config::BooleanValue.new('roulette.kick',
-    :default => false, 
+    :default => false,
     :desc => "Kicks shot players from the channel")
   Config.register Config::BooleanValue.new('roulette.twice_in_a_row',
-    :default => false, 
+    :default => false,
     :desc => "Allow players to go twice in a row")
 
   def initialize
@@ -174,7 +174,7 @@ class RoulettePlugin < Plugin
       k = match[1]
 
       total_players += 1
-      
+
       win_rate = v.wins.to_f / v.games * 100
       if h_win_percent[0].nil? || win_rate > h_win_percent[1] && v.games > 2
         h_win_percent = [[k], win_rate]
index 0b77871e00556460eb1508681549c6d1de280efc..92f4dda4c7068e0d02c0de33066b67d50edc5119 100644 (file)
@@ -1,7 +1,7 @@
 #-- vim:sw=2:et
 #kate: indent-width 2
 #++
-# 
+#
 # :title: Shiritori Plugin for RBot
 #
 # Author:: Yaohan Chen <yaohan.chen@gmail.com>
 # players can interrupt a turn to join, or a free mode where anyone can speak at any
 # time.
 #
-# In Japanese mode, if present, the plugin can use normalize-japanese 
+# In Japanese mode, if present, the plugin can use normalize-japanese
 # <http://neruchan.mine.nu:60880/normalize-japanese.rb> to allow
 # katakana words be used like hiragana.
-# 
+#
 # TODO
 # * a system to describe settings, so they can be displayed, changed and saved
 # * adjust settings during game
@@ -35,7 +35,7 @@ class Dictionary
   def has_word?(s)
     raise NotImplementedError
   end
-  
+
   # whether any word starts with prefix, excluding words in excludes. This can be
   # possible with non-enumerable dictionaries since some dictionary engines provide
   # prefix searching.
@@ -51,12 +51,12 @@ class WordlistDictionary < Dictionary
     @words = words
     # debug "Created dictionary with #{@words.length} words"
   end
-  
+
     # whether string s is a word
   def has_word?(s)
     @words.include? s
   end
-  
+
   # whether any word starts with prefix, excluding words in excludes
   def any_word_starting?(prefix, excludes)
     # (@words - except).any? {|w| w =~ /\A#{prefix}.+/}
@@ -69,7 +69,7 @@ end
 # whether it's possible to continue a word
 class Shiritori
   attr_reader :used_words
-  
+
   # dictionary:: a Dictionary object
   # overlap_lengths:: a Range for allowed lengths to overlap when continuing words
   # check_continuable:: whether all words are checked whether they're continuable,
@@ -82,7 +82,7 @@ class Shiritori
     @allow_reuse = allow_reuse
     @used_words = []
   end
-  
+
   # Prefix of s with length n
   def head_of(s, n)
     # TODO ruby2 unicode
@@ -102,7 +102,7 @@ class Shiritori
   def range_under(r, n)
     r.begin .. [r.end, n-1].min
   end
-  
+
   # TODO allow the ruleset to customize this
   def continues?(w2, w1)
     # this uses the definition w1[-n,n] == w2[0,n] && n < [w1.length, w2.length].min
@@ -110,7 +110,7 @@ class Shiritori
     range_under(@overlap_lengths, [len(w1), len(w2)].min).any? {|n|
       tail_of(w1, n)== head_of(w2, n)}
   end
-  
+
   # Checks whether *any* unused word in the dictionary completes the word
   # This has the limitation that it can't detect when a word is continuable, but the
   # only continuers aren't continuable
@@ -118,8 +118,8 @@ class Shiritori
     range_under(@overlap_lengths, len(s)).any? {|n|
       @dictionary.any_word_starting?(tail_of(s, n), @used_words) }
   end
-  
-  # Given a string, give a verdict based on current shiritori state and dictionary 
+
+  # Given a string, give a verdict based on current shiritori state and dictionary
   def process(s)
     # TODO optionally allow used words
     # TODO ruby2 unicode
@@ -167,14 +167,14 @@ class ShiritoriGame
     @timer_handle = nil
     @say = say
     @when_die = when_die
-    
+
     # TODO allow other forms of dictionaries
     dictionary = WordlistDictionary.new(@ruleset[:words])
     @game = Shiritori.new(dictionary, @ruleset[:overlap_lengths],
                                       @ruleset[:check_continuable],
                                       @ruleset[:allow_reuse])
   end
-  
+
   def say(s)
      @say.call(s)
   end
@@ -184,10 +184,10 @@ class ShiritoriGame
   # * when time_limit > 0, new players can join at any time, but existing players must
   #   take turns, each of which expires after time_limit
   # * when time_imit is 0, anyone can speak in the game at any time
-  def take_turns? 
+  def take_turns?
     @players.length > 1 && @ruleset[:time_limit] > 0
   end
-  
+
   # the player who has the current turn
   def current_player
     @players.first
@@ -200,7 +200,7 @@ class ShiritoriGame
   def previous_word
     @game.used_words[-2]
   end
-  
+
   # announce the current word, and player if take_turns?
   def announce
     say(if take_turns?
@@ -237,13 +237,13 @@ class ShiritoriGame
     end
     announce
   end
-  
+
   # handle when turn time limit goes out
   def time_out
     if @ruleset[:lose_when_timeout]
       say _("%{player} took too long and is out of the game. Try again next game!") %
       { :player => current_player }
-      if @players.length == 2 
+      if @players.length == 2
         # 2 players before, and one should remain now
         # since the game is ending, save the trouble of removing and booting the player
         say _("%{player} is the last remaining player and the winner! Congratulations!") %
@@ -269,12 +269,12 @@ class ShiritoriGame
   def handle_message(m)
     message = m.message
     speaker = m.sourcenick.to_s
-    
+
     return unless @ruleset[:listen] =~ message
 
     # in take_turns mode, only new players are allowed to interrupt a turn
     return if @booted_players.include? speaker ||
-              (take_turns? && 
+              (take_turns? &&
                speaker != current_player &&
                (@players.length > 1 && @players.include?(speaker)))
 
@@ -310,7 +310,7 @@ class ShiritoriGame
       m.reply _("It's impossible to continue the chain from %{word}. Start with another word.") % {:word => message}
     end
   end
-  
+
   # end the game
   def die
     # redefine restart_timer to no-op
@@ -331,11 +331,11 @@ class ShiritoriPlugin < Plugin
     _("A game in which each player must continue the previous player's word, by using its last one or few characters/letters of the word to start a new word. 'shiritori <ruleset>' => Play shiritori with a set of rules. Available rulesets: %{rulesets}. 'shiritori stop' => Stop the current shiritori game.") %
       {:rulesets => @rulesets.keys.join(', ')}
   end
-  
+
   def initialize()
     super
     @games = {}
-    
+
     # TODO make rulesets more easily customizable
     # TODO initialize default ruleset from config
     # Default values of rulesets
@@ -401,7 +401,7 @@ class ShiritoriPlugin < Plugin
     end
     return ruleset
   end
-  
+
   # start shiritori in a channel
   def cmd_shiritori(m, params)
     if @games.has_key?( m.channel )
@@ -426,7 +426,7 @@ class ShiritoriPlugin < Plugin
       end
     end
   end
-  
+
   # change rules for current game
   def cmd_set(m, params)
     require 'enumerator'
@@ -434,7 +434,7 @@ class ShiritoriPlugin < Plugin
     params[:rules].each_slice(2) {|opt, value| new_rules[opt] = value}
     raise NotImplementedError
   end
-  
+
   # stop the current game
   def cmd_stop(m, params)
     if @games.has_key? m.channel
@@ -446,19 +446,19 @@ class ShiritoriPlugin < Plugin
       m.reply _("No game to stop here, because no game is being played.")
     end
   end
-  
+
   # remove the game, so channel messages are no longer processed, and timer removed
   def remove_game(channel)
     @games.delete channel
   end
-  
+
   # all messages from a channel is sent to its shiritori game if any
   def message(m)
     return unless @games.has_key?(m.channel)
     # send the message to the game in the channel to handle it
     @games[m.channel].handle_message m
   end
-  
+
   # remove all games
   def cleanup
     @games.each_key {|g| g.die}
index 5b2593ee746212db524e62ca5b5a33cbf4171cb2..84420631ecb317cb0d155d047c647b440d7c6d2d 100644 (file)
@@ -108,7 +108,7 @@ class UnoGame
       @color = 'Wild'
       raise if value and not value == '+4'
       if value
-        @value = value.dup 
+        @value = value.dup
         @shortform = 'w'+value
       else
         @value = nil
@@ -411,7 +411,7 @@ class UnoGame
         # only be possible if the first W+4 was illegal, so it wouldn't
         # apply for a W+4 played on a +2 anyway.
         #
-        if @picker == 0 and Wild === cards.first and cards.first.value 
+        if @picker == 0 and Wild === cards.first and cards.first.value
           # save the previous discard in case of challenge
           @last_discard = @discard.dup
           # save the color too, in case it was a Wild
index 3f7cf5a185fe2c823aa9739848caceb5bda0a988..0b9393ef0c67c975aa97b61a9c31315fc3b24bbc 100755 (executable)
@@ -11,18 +11,18 @@ class GoogleFightPlugin < Plugin
   def help(plugin, topic)
     "googlefight <keyword 1> <keyword 2> [... <keyword n+1>] => battles given keywords based on amount of google search results and announces the winner!"
   end
-  
+
   def fight(m, params)
     keywords = parse_keywords(params)
     return if keywords.nil?
-    
+
     keywords.map! do |k|
       [k, google_count(k)]
     end
-    
+
     m.reply output(keywords)
   end
-  
+
   def output(result)
     result = result.sort_by { |e| e[1] }.reverse
     str = result.map do |kw|
@@ -31,26 +31,26 @@ class GoogleFightPlugin < Plugin
         :count   => kw[1].to_s.gsub(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1,")
       }
     end.join(" vs. ")
-    
+
     unless result[0][1].zero?
       str << _(" -- %{keyword} wins!") % {
         :keyword => Bold+result[0][0]+Bold
       }
     else
       str << _(" -- no winner here!")
-    end 
+    end
   end
-  
+
   def parse_keywords(params)
     str = params[:keywords].join(" ")
-    
+
     # foo "foo bar" bar
     # no separators so assume they're all separate keywords
     if str.match(/(?:"[\w\s]+"|\w+)(?: (?:"[\w\s]+"|\w+))+/)
       str.scan(/"[^"]+"|\S+/).flatten
     end
   end
-  
+
   def google_count(query)
     url  = 'http://www.google.com/search?hl=en&safe=off&btnG=Search&q=' << CGI.escape(query)
     html = Net::HTTP.get(URI.parse((url)))
index bfe27369c6b8ab8e87e02488a7f2f86d3f972fa2..f3e6504dc617e4d507f2bee78303509a08a1a906 100644 (file)
@@ -469,7 +469,7 @@ class ImdbPlugin < Plugin
   end
 
   # Find the movies with a participation of :who in the year :year
-  # TODO: allow year to be either a year or a decade ('[in the] 1960s') 
+  # TODO: allow year to be either a year or a decade ('[in the] 1960s')
   #
   def movies(m, params)
     who = params[:who].to_s
index 0c44965442a427392940db0901971304253866f5..993450a554e9204ec4877fbd450d9eac5662b9a1 100644 (file)
@@ -134,7 +134,7 @@ class InsultPlugin < Plugin
 ]
 
 ##
-# Amounts 
+# Amounts
 ##
 @@amt = [
 "accumulation",
@@ -206,7 +206,7 @@ class InsultPlugin < Plugin
 "cold sores",
 "anal warts",
 ]
-  
+
   def help(plugin, topic="")
     return "[msg]insult me|<person> => insult you or <person>. msginsult insults in private"
   end
index ad5f57a27dc9c1d151f32915fad2a8603eae66fc..060e743ec9687bd02406f9b6220f8fec97eeb189 100644 (file)
@@ -55,7 +55,7 @@ class KarmaPlugin < Plugin
     @registry[thing] = params[:val].to_i
     karma(m, params)
   end
-  
+
   def help(plugin, topic="")
     "karma module: Listens to everyone's chat. <thing>++/<thing>-- => increase/decrease karma for <thing>, karma for <thing>? => show karma for <thing>, karmastats => show stats. Karma is a community rating system - only in-channel messages can affect karma and you cannot adjust your own."
   end
index 360735e918803ce6cb1cb6170f04c00710c9fc19..b9e7f5119afaabfc072795ba42b1bed80c9da878 100644 (file)
@@ -31,7 +31,7 @@ class LinkBot < Plugin
     :desc => "List of regexp which match linkbot messages; each regexp needs to have three captures, which in order are the nickname of the original speaker, network, and original message",
     :on_change => proc {|bot, v| bot.plugins['linkbot'].update_patterns})
   # TODO use template strings instead of regexp for user friendliness
-  
+
   # Initialize the plugin
   def initialize
     super
index 089d939decc4ccd32e42236a5d02ee1d5c41b969..dd66ae1d99c6685c773de2473ecbca248f38a7df 100644 (file)
@@ -197,7 +197,7 @@ class MarkovPlugin < Plugin
   def chat(m, params)
     line = generate_string(params[:seed1], params[:seed2])
     if line != "#{params[:seed1]} #{params[:seed2]}"
-      m.reply line 
+      m.reply line
     else
       m.reply "I can't :("
     end
@@ -221,7 +221,7 @@ class MarkovPlugin < Plugin
       m.reply "I can't :("
     end
   end
-  
+
   def message(m)
     return if ignore? m
 
@@ -231,7 +231,7 @@ class MarkovPlugin < Plugin
     if m.action?
       message = "#{m.sourcenick} #{message}"
     end
-    
+
     @learning_queue.push message
     random_markov(m, message) unless m.replied?
   end
index 9dd35c985fabdb2f53be5e942b1a4644aab6a4f5..081c9c042378cf761c5670e5df82dc34df3f6238 100644 (file)
@@ -44,7 +44,7 @@ class MathPlugin < Plugin
       val = Math.exp($2).to_s
       expr.gsub!(/#{Regexp.escape exp}/, "+#{val}")
     end
-    
+
     while expr =~ /^\s*(dec2hex\s*(\d+))\s*\?*/
       exp = $1
       val = sprintf("%x", $2)
@@ -56,13 +56,13 @@ class MathPlugin < Plugin
     while expr =~ /(log\s*((\d+\.?\d*)|\d*\.?\d+))\s*/
       exp = $1
       res = $2
-      
+
       if res == 0
         val = "Infinity"
       else
         val = Math.log(res).to_s
       end
-      
+
       expr.gsub!(/#{Regexp.escape exp}/, "+#{val}")
     end
 
index 845c74345dad7b444447fedd2fe5219fe2fd3bae..0df78691eebebdb195908d156f606462e2435afa 100644 (file)
@@ -73,7 +73,7 @@ class ModesPlugin < Plugin
   def do_mode(m, channel, user, mode)
     unless channel
       if m.private?
-        target = user.nil? ? "you" : user 
+        target = user.nil? ? "you" : user
         m.reply "You should tell me where you want me to #{mode} #{target}."
         return
       else
index ed3c8708fc560ebadabc68bef6f6f45040bfe556..f0277cdf512363cce81a88645792f7f313cd0c03 100644 (file)
@@ -11,7 +11,7 @@
 # in case it couldn't be achieved.
 
 class NickRecoverPlugin < Plugin
-  
+
   Config.register Config::IntegerValue.new('irc.nick_retry',
     :default => 60, :valiedate => Proc.new { |v| v >= 0 },
     :on_change => Proc.new do |bot, v|
index 36333477eacbdc00f90e670261f3e72f3402f6b7..768840d38522b13ce73fd986816c5ae0966e7a88 100644 (file)
@@ -20,7 +20,7 @@
 #         previously identified successfully
 
 class NickServPlugin < Plugin
-  
+
   Config.register Config::StringValue.new('nickserv.name',
     :default => "nickserv", :requires_restart => false,
     :desc => _("Name of the nick server (all lowercase)"))
@@ -62,7 +62,7 @@ class NickServPlugin < Plugin
       return _("nickserv listnicks: lists nicknames and associated password the bot knows about - you will need config level auth access to do this one and it will reply by privmsg only")
     end
   end
-  
+
   def genpasswd
     return Irc::Bot::Auth.random_password
   end
@@ -167,12 +167,12 @@ class NickServPlugin < Plugin
       m.reply _("uh ... something went wrong ...")
     end
   end
-  
+
   def connect
     @identified = false
     do_identify
   end
-  
+
   def nicktaken(nick)
     if @registry.has_key?(nick)
       ns_say "GHOST #{nick} #{@registry[nick]}"
index 0f901017c29b8c021288953811375f1c3e21543c..a3402711d41441d9347b2a2a17bd806006d18b27 100644 (file)
@@ -10,7 +10,7 @@ class DnsPlugin < Plugin
   def help(plugin, topic="")
     "dns <hostname|ip> => show local resolution results for hostname or ip address"
   end
-  
+
   def name_to_ip(m, params)
     begin
       a = getaddresses(params[:host])
@@ -23,7 +23,7 @@ class DnsPlugin < Plugin
       m.reply "#{params[:host]}: not found"
     end
   end
-  
+
   def ip_to_name(m, params)
     begin
       a = gethostname(params[:ip])
index 40b91e11b878fc9308e1379c22ae0b99ec108702..c1a8f9c474c53ab1d720a7e2b1de57b32c929b60 100644 (file)
@@ -10,7 +10,7 @@
 # Automatically auths with Q on QuakeNet servers
 
 class QPlugin < Plugin
-  
+
   def help(plugin, topic="")
     case topic
     when ""
@@ -23,7 +23,7 @@ class QPlugin < Plugin
       return "qauth register <email>: register with Q, an email on how to proceed will be sent to the email address you provide"
     end
   end
-  
+
   def initialize
     super
     # this plugin only wants to store strings!
@@ -43,7 +43,7 @@ class QPlugin < Plugin
     @registry['quakenet.auth'] = params[:password]
     m.okay
   end
-  
+
   def connect
     identify(nil, {}) if on_quakenet?
   end
index 2a6467896fe3cb54775906ff8b156d09fb3291ea..a18f1ebac5b2d645f72ed57fa0c060af980f34f8 100644 (file)
@@ -37,7 +37,7 @@ class QuotePlugin < Plugin
         if @changed[channel]
           debug "Writing new quotefile for channel #{channel} ..."
           Utils.safe_save(datafile channel) {|file|
-            quotes.compact.each {|q| 
+            quotes.compact.each {|q|
               file.puts "#{q.num} | #{q.date} | #{q.source} | #{q.quote}"
             }
           }
@@ -65,7 +65,7 @@ class QuotePlugin < Plugin
 
   def addquote(source, channel, quote)
     @lists[channel] = Array.new if(!@lists.has_key?(channel))
-    num = @lists[channel].length 
+    num = @lists[channel].length
     @lists[channel][num] = Quote.new(num, Time.new, source.fullform, quote)
     @changed[channel] = true
     return num
index ee338e2d38dae244e6487f1a5150dc5663f14956..55fabcdbe4eea4a537e7bd95606aaa2e600f8373 100644 (file)
@@ -207,7 +207,7 @@ class ReactionPlugin < Plugin
       "between 0 and 1 (i.e. 0% and 100%). A reaction can have multiple replies, each with a different chance; if the total of the chances is less than one, " +
       "there is a chance that the trigger will not actually cause a reply. Otherwise, the chances express the relative frequency of the replies."
     when :trigger, :triggers
-      "reaction triggers can have one of the format: single_word 'multiple words' \"multiple words \" /regular_expression/ !regular_expression!. " + 
+      "reaction triggers can have one of the format: single_word 'multiple words' \"multiple words \" /regular_expression/ !regular_expression!. " +
       "If prefixed by 'act:' (e.g. act:/(order|command)s/) the bot will only respond if a CTCP ACTION matches the trigger"
     when :reply, :replies
       "reaction replies are simply messages that the bot will reply when a trigger is matched. " +
index e3f248ef6ef91529bd97e48f5e7a266b26faf50b..804e3f0bfd8968003182852d7b8b2f9b8727e6db 100644 (file)
@@ -203,11 +203,11 @@ class RemindPlugin < Plugin
   end
   def no_more(m, params)
     who = params.has_key?(:who) ? params[:who] : m.sourcenick
-    deleted = params.has_key?(:string) ? 
+    deleted = params.has_key?(:string) ?
               del_reminder(who, params[:string].to_s) : del_reminder(who)
     if deleted
       m.okay
-    else 
+    else
       m.reply "but I wasn't going to :/"
     end
   end
index 763dd6589c44b79e68c59c17cfc3da2c9f76003c..abecb6ec5a5966b57f52e0dd99593ae4d8715053 100644 (file)
@@ -52,7 +52,7 @@ class RiPlugin < Plugin
       return m.reply("failed to execute ri")
     end
     ret = ret.gsub(/\t/, "  ").split(/\n/).join(" ").gsub(/\s\s+/, '  ')
-    
+
     if ret.length > @bot.config['ri.max_length']
       if !m.private? && tgt.to_s != m.sourcenick
         return m.reply('entry is too long to send to the channel or to some other user, use /msg to ask me about it')
index 885ae2486c40e1652138cb0a98e84bd3ab21e840..bfc700d3e90a6738b3282e3f662c89fc1dd5c0f6 100644 (file)
@@ -16,7 +16,7 @@
 
 require 'rss'
 
-# Try to load rss/content/2.0 so we can access the data in <content:encoded> 
+# Try to load rss/content/2.0 so we can access the data in <content:encoded>
 # tags.
 begin
   require 'rss/content/2.0'
@@ -293,7 +293,7 @@ class RSSFeedsPlugin < Plugin
   # Make an  'unique' ID for a given item, based on appropriate bot options
   # Currently only suppored is bot.config['rss.show_updated']: when false,
   # only the guid/link is accounted for.
-  
+
   def make_uid(item)
     uid = [item.guid! || item.link!]
     if @bot.config['rss.show_updated']
@@ -1018,7 +1018,7 @@ class RSSFeedsPlugin < Plugin
           else
             date = item.source.updated.content.to_s
           end
-        elsif item.respond_to?(:pubDate) 
+        elsif item.respond_to?(:pubDate)
           if item.pubDate.class <= Time
             date = item.pubDate.strftime("%Y/%m/%d %H:%M")
           else
@@ -1055,7 +1055,7 @@ class RSSFeedsPlugin < Plugin
     desc_opt[:limit] = @bot.config['rss.text_max']
     desc_opt[:a_href] = :link_out if @bot.config['rss.show_links']
 
-    # We prefer content_encoded here as it tends to provide more html formatting 
+    # We prefer content_encoded here as it tends to provide more html formatting
     # for use with ircify_html.
     if item.respond_to?(:content_encoded) && item.content_encoded
       desc = item.content_encoded.ircify_html(desc_opt)
index e80a02b0910eed9e0a69a4eadfd7d9cb5a5569fa..1c552aab1969a2f53f1daa25c179930a7b89c09a 100644 (file)
 
 class SalutPlugin < Plugin
   Config.register Config::BooleanValue.new('salut.all_languages',
-    :default => true, 
+    :default => true,
     :desc => "Check for a salutation in all languages and not just in the one defined by core.language",
     :on_change => Proc.new {|bot, v| bot.plugins['salut'].reload}
   )
   Config.register Config::BooleanValue.new('salut.address_only',
-    :default => true, 
+    :default => true,
     :desc => "When set to true, the bot will only reply to salutations directed at him",
     :on_change => Proc.new {|bot, v| bot.plugins['salut'].reload}
   )
@@ -113,7 +113,7 @@ class SalutPlugin < Plugin
     return unless salut
     # If the bot wasn't addressed, we continue only if the match was exact
     # (apart from space and punctuation) or if @match[:dest] matches too
-    return unless to_me or m.message =~ /^#{@punct}#{salut.first}#{@punct}$/ or m.message =~ @match[salut[1]][:dest] 
+    return unless to_me or m.message =~ /^#{@punct}#{salut.first}#{@punct}$/ or m.message =~ @match[salut[1]][:dest]
     h = Time.new.hour
     case h
     when 4...12
index 849783b8917ba5742fd71c955d5099da259dbe1c..0923dd5dc15eeb59c40e770d15008c4fa241e7db 100644 (file)
@@ -11,7 +11,7 @@
 #
 # Scripts are little Ruby programs that run in the context of the script
 # plugin. You can create them directly in an IRC channel, and invoke them just
-# like normal rbot plugins. 
+# like normal rbot plugins.
 
 define_structure :Command, :code, :nick, :created, :channel
 
@@ -64,8 +64,8 @@ class ScriptPlugin < Plugin
 
       # Convenience variables, can be accessed by scripts:
       args = m.message.split
-      args.delete_at( 0 ) 
-      user = args.empty? ? m.sourcenick : args.first  
+      args.delete_at( 0 )
+      user = args.empty? ? m.sourcenick : args.first
 
       Thread.start {
         # TODO allow different safe levels for different botusers
@@ -152,7 +152,7 @@ class ScriptPlugin < Plugin
   def handle_add_force( m, params )
     handle_add( m, params, true )
   end
-    
+
 
   def handle_del( m, params )
     name = params[:name]
@@ -176,9 +176,9 @@ class ScriptPlugin < Plugin
     page = params[:page].to_i
     page = [page, 1].max
     page = [page, num_pages].min
-    str = cmds[(page-1)*cmds_per_page, cmds_per_page].join(', ') 
+    str = cmds[(page-1)*cmds_per_page, cmds_per_page].join(', ')
 
-    m.reply "Available scripts (page #{page}/#{num_pages}): #{str}" 
+    m.reply "Available scripts (page #{page}/#{num_pages}): #{str}"
   end
 
 
index dc0c2ca9bb58419912ef91ac8bf6d327a232df7c..a7ac64cb78427e9ee41a32d58ee74cd4c275a23f 100644 (file)
@@ -113,7 +113,7 @@ class SearchPlugin < Plugin
   def gcalc(m, params)
     what = params[:words].to_s
     searchfor = CGI.escape(what)
-    
+
     debug "Getting gcalc thing: #{searchfor.inspect}"
     url = GOOGLE_SEARCH + searchfor
 
@@ -125,24 +125,24 @@ class SearchPlugin < Plugin
     end
 
     debug "#{html.size} bytes of html recieved"
-    
+
     results = html.scan(GOOGLE_CALC_RESULT)
     debug "results: #{results.inspect}"
-    
+
     if results.length != 1
       m.reply "couldn't calculate #{what}"
       return
     end
-    
+
     result = results[0][0].ircify_html
     debug "replying with: #{result.inspect}"
     m.reply "#{result}"
   end
-  
+
   def gcount(m, params)
     what = params[:words].to_s
     searchfor = CGI.escape(what)
-    
+
     debug "Getting gcount thing: #{searchfor.inspect}"
     url = GOOGLE_SEARCH + searchfor
 
@@ -154,15 +154,15 @@ class SearchPlugin < Plugin
     end
 
     debug "#{html.size} bytes of html recieved"
-    
+
     results = html.scan(GOOGLE_COUNT_RESULT)
     debug "results: #{results.inspect}"
-    
+
     if results.length != 1
       m.reply "couldn't count #{what}"
       return
     end
-    
+
     result = results[0][0].ircify_html
     debug "replying with: #{result.inspect}"
     m.reply "total results: #{result}"
@@ -172,7 +172,7 @@ class SearchPlugin < Plugin
   def gdef(m, params)
     what = params[:words].to_s
     searchfor = CGI.escape("define " + what)
-    
+
     debug "Getting gdef thing: #{searchfor.inspect}"
     url = GOOGLE_WAP_SEARCH + searchfor
 
@@ -186,12 +186,12 @@ class SearchPlugin < Plugin
     debug html
     results = html.scan(GOOGLE_DEF_RESULT)
     debug "results: #{results.inspect}"
-    
+
     if results.length != 1
       m.reply "couldn't find a definition for #{what} on Google"
       return
     end
-    
+
     head = results[0][0].ircify_html
     text = results[0][1].ircify_html
     link = results[0][2]
@@ -224,7 +224,7 @@ plugin = SearchPlugin.new
 
 plugin.map "search *words", :action => 'google', :threaded => true
 plugin.map "google *words", :action => 'google', :threaded => true
-plugin.map "gcount *words", :action => 'gcount', :threaded => true 
+plugin.map "gcount *words", :action => 'gcount', :threaded => true
 plugin.map "gcalc *words", :action => 'gcalc', :threaded => true
 plugin.map "gdef *words", :action => 'gdef', :threaded => true
 plugin.map "wp :lang *words", :action => 'wikipedia', :requirements => { :lang => /^\w\w\w?$/ }, :threaded => true
index ccfdb7261e11148cff3c20a6b00f2ea969de9524..1483062cd206a9f6bcaaa8ccb97a18c7c89f0bd6 100644 (file)
@@ -11,7 +11,7 @@ class SeenPlugin < Plugin
   def help(plugin, topic="")
     "seen <nick> => have you seen, or when did you last see <nick>"
   end
-  
+
   def privmsg(m)
     unless(m.params =~ /^(\S)+$/)
       m.reply "incorrect usage: " + help(m.plugin)
@@ -39,7 +39,7 @@ class SeenPlugin < Plugin
                                           m.target.to_s, m.message.dup)
     when QuitMessage
       return if m.address?
-      @registry[m.sourcenick] = Saw.new(m.sourcenick.dup, now, "QUIT", 
+      @registry[m.sourcenick] = Saw.new(m.sourcenick.dup, now, "QUIT",
                                         nil, m.message.dup)
     when NickMessage
       return if m.address?
@@ -48,23 +48,23 @@ class SeenPlugin < Plugin
       @registry[m.newnick] = saw
     when PartMessage
       return if m.address?
-      @registry[m.sourcenick] = Saw.new(m.sourcenick.dup, Time.new, "PART", 
+      @registry[m.sourcenick] = Saw.new(m.sourcenick.dup, Time.new, "PART",
                                         m.target.to_s, m.message.dup)
     when JoinMessage
       return if m.address?
-      @registry[m.sourcenick] = Saw.new(m.sourcenick.dup, Time.new, "JOIN", 
+      @registry[m.sourcenick] = Saw.new(m.sourcenick.dup, Time.new, "JOIN",
                                         m.target.to_s, m.message.dup)
     when TopicMessage
       return if m.address? or m.info_or_set == :info
-      @registry[m.sourcenick] = Saw.new(m.sourcenick.dup, Time.new, "TOPIC", 
+      @registry[m.sourcenick] = Saw.new(m.sourcenick.dup, Time.new, "TOPIC",
                                         m.target.to_s, m.message.dup)
     end
   end
-  
+
   def seen(saw)
     ret = "#{saw.nick} was last seen "
     ago = Time.new - saw.time
-    
+
     if (ago.to_i == 0)
       ret << "just now, "
     else
@@ -88,7 +88,7 @@ class SeenPlugin < Plugin
       ret << "changing the topic of #{saw.where} to #{saw.message}"
     end
   end
-  
+
 end
 plugin = SeenPlugin.new
 plugin.register("seen")
index 7eeb005f8fce8705569e695e04a1f467d24217d6..3aee6f4dcc69ccaabdcc2bbbdd5ac560719cd524 100644 (file)
@@ -15,7 +15,7 @@ require "shorturl"
 require "uri"
 
 class ShortenURLs < Plugin
-  # starting from about shorturl 0.8.4, the WWW module is not defined 
+  # starting from about shorturl 0.8.4, the WWW module is not defined
   include WWW rescue nil
 
   Config.register Config::ArrayValue.new('shortenurls.services_blacklist',
index 5b3c2f3bd367f1fb10e691a2c4f3fb4e740da7a9..69f1566f7245f5db4a37a94061a8156db2bd5df9 100644 (file)
@@ -62,7 +62,7 @@ class SlashdotPlugin < Plugin
       @bot.register_filter(:slashdot, :htmlinfo) { |s| slashdot_filter(s) }
     end
   end
-  
+
   def search_slashdot(m, params)
     max = params[:limit].to_i
     search = params[:search].to_s
@@ -99,7 +99,7 @@ class SlashdotPlugin < Plugin
       m.reply "search for #{search} failed"
     end
   end
-  
+
   def slashdot(m, params)
     debug params.inspect
     max = params[:limit].to_i
@@ -123,12 +123,12 @@ class SlashdotPlugin < Plugin
     max = 8 if max > 8
     matches = Array.new
     doc.elements.each("*/story") {|e|
-      matches << [ e.elements["title"].text, 
-                   e.elements["author"].text, 
+      matches << [ e.elements["title"].text,
+                   e.elements["author"].text,
                    e.elements["time"].text.gsub(/\d{4}-(\d{2})-(\d{2})/, "\\2/\\1").gsub(/:\d\d$/, "") ]
       done += 1
       break if done >= max
-    } 
+    }
     if oneline
       m.reply matches.collect{|mat| mat[0]}.join(" | ")
     else
index e0a29013b13c4179bed3c355313f29643d70e5e6..866c0600c1ef6243d729a381054a0f6ea60549ef 100644 (file)
@@ -1,21 +1,21 @@
 HE = [
 
     ['a superhumanly strong','an underprivileged','a globe-trotting','an impetuous','a shy','a suave','a notorious','a one-legged','an all-American','a short-sighted','an otherworldly','a hate-fuelled','a scrappy','an unconventional','a jaded','a leather-clad','a fiendish','a Nobel prize-winning','a suicidal','a maverick','a bookish','an old-fashioned','a witless','a lounge-singing','a war-weary','a scarfaced','a gun-slinging','an obese','a time-tossed','a benighted','an uncontrollable','an immortal','an oversexed','a world-famous','an ungodly','a fast talking','a deeply religious','a lonely','a sword-wielding','a genetically engineered'],
-    
+
     ['white trash','zombie','shark-wrestling','playboy','guitar-strumming','Jewish',
     'sweet-toothed','bohemian','crooked','chivalrous','moralistic','amnesiac','devious','drug-addicted',
     'voodoo','Catholic','overambitious','coffee-fuelled','pirate','misogynist','skateboarding',
     'arachnophobic','Amish','small-town','Republican','one-eyed','gay','guerilla','vegetarian',
     'dishevelled','alcoholic','flyboy','ninja','albino','hunchbacked','neurotic','umbrella-wielding',
     'native American','soccer-playing','day-dreaming'],
-    
+
     ['grifter','stage actor','paramedic','gentleman spy','jungle king','hairdresser',
     'photographer','ex-con','vagrant','filmmaker','werewolf','senator','romance novelist','shaman','cop',
     'rock star','farmboy','cat burglar','cowboy','cyborg','inventor','assassin','boxer','dog-catcher',
     'master criminal','gangster','firefighter','househusband','dwarf','librarian','paranormal investigator',
     'Green Beret','waffle chef','vampire hunter','messiah','astronaut','sorceror','card sharp','matador',
     'barbarian'],
-    
+
     ['with a robot buddy named Sparky','whom everyone believes is mad','gone bad',
     'with a mysterious suitcase handcuffed to his arm','living undercover at Ringling Bros. Circus',
     'searching for his wife''s true killer','who dotes on his loving old ma','looking for ''the Big One''',
@@ -42,19 +42,19 @@ SHE = [
     'a plucky','a sarcastic','a psychotic','a hard-bitten','a manipulative','an orphaned','a cosmopolitan',
     'a chain-smoking','a cold-hearted','a warm-hearted','a sharp-shooting','an enchanted','a wealthy','a pregnant',
     'a mentally unstable','a virginal','a brilliant','a disco-crazy','a provocative','an artistic'],
-    
+
     ['tempestuous', 'Buddhist', 'foul-mouthed', 'nymphomaniac', 'green-skinned', 'impetuous', 'African-American','punk','hypochondriac','junkie','blonde','goth','insomniac','gypsy','mutant','renegade', 'tomboy','French-Canadian','motormouth','belly-dancing','communist','hip-hop','thirtysomething',
     'cigar-chomping','extravagent','out-of-work','Bolivian','mute','cat-loving','snooty','wisecracking',
     'red-headed','winged','kleptomaniac','antique-collecting','psychic','gold-digging','bisexual','paranoid',
     'streetsmart'],
-    
+
     ['archaeologist','pearl diver','mechanic','detective','hooker','femme fatale',
     'former first lady','barmaid','fairy princess','magician''s assistant','schoolgirl','college professor',
     'angel','bounty hunter','opera singer','cab driver','soap star','doctor','politician','lawyer','nun',
     'snake charmer','journalist','bodyguard','vampire','stripper','Valkyrie','wrestler','mermaid','single mother',
     'safe cracker','traffic cop','research scientist','queen of the dead','Hell''s Angel','museum curator',
     'advertising executive','widow','mercenary','socialite'],
-    
+
     ['on her way to prison for a murder she didn''t commit','trying to make a difference in a man''s world',
     'with the soul of a mighty warrior','looking for love in all the wrong places','with an MBA from Harvard',
     'who hides her beauty behind a pair of thick-framed spectacles','with the power to see death',
@@ -80,14 +80,14 @@ TITLE = [
     'BLOOD', 'HARD', 'STEEL', 'TERMINAL', 'HOT', 'COLD', 'TOTAL', 'PROGNOSIS:',
     'BURNING', 'FAST', 'PAINFUL', 'MISSION:', 'DEADLY', 'PARTIAL',
     'RAGING', 'CORDIAL'],
-    
+
     ['DECISION', 'INCISION', 'CONCLUSION',
     'CONCUSSION', 'HEAT', 'FIRE', 'RECOIL', 'INSTINCT', 'DESIRE', 'WEAPON',
     'BADGE', 'DEED', 'JUSTICE', 'HEAT', 'VENGEANCE', 'RECESSION', 'COMBUSTION',
     'JUDGEMENT', 'WARNING', 'AWAKENING', 'JURISDICTION', 'BASIS', 'FINDINGS',
     'INJECTION', 'REJECTION', 'REMISSION', 'DIGESTION', 'IDENTITY',
     'DISPERSION'],
-    
+
     ['II','III','IV','V','VI','VII','VIII','IX','X','XI','XII','XIII','XIV','XV','XVI','XVII','XVIII','XIX']
 
 ]
@@ -96,11 +96,11 @@ class TheyFightCrime < Plugin
     def help(plugin, topic="")
         "movieplot => generate a random movie scenario. movietitle => generate a random movie title."
     end
-    
+
     def get_random_things(thing_array)
         thing_array.map { |things| things.pick_one }
     end
-    
+
     def movieplot(m, params)
         he_things = get_random_things(HE)
         she_things = get_random_things(SHE)
index 4e7543c8be2317a0f6fc78f191602509985c4d0f..190abd6acdcde59f4f645f8300c452f2f8d5b5de 100644 (file)
@@ -45,13 +45,13 @@ class TimePlugin < Plugin
     end
     ['/', '_'].each { |sp|
         arr = Array.new
-        zone.split(sp).each{ |s| 
+        zone.split(sp).each{ |s|
             s[0] = s[0,1].upcase
             s[1, s.length] = s[1, s.length].downcase if sp == '/'
             arr.push(s) }
             zone = arr.join( sp )
         }
-    
+
     tz = TZInfo::Timezone.get( zone )
     "#{tz.friendly_identifier} - #{tz.now.strftime( '%a %b %d %H:%M' )} #{tz.current_period.abbreviation}"
   end
index ad9c431c91e5e430426f28c544d448e69005db69..0e09cb4855e717dd81473ead737443331570accd 100644 (file)
@@ -39,7 +39,7 @@ class Translator
     @cache = cache
   end
 
+
   # whether the translator supports this direction
   def support?(from, to)
     from != to && @directions[from].include?(to)
@@ -316,7 +316,7 @@ class TranslatorPlugin < Plugin
   end
 
   def update_default
-    @default_translators = bot.config['translator.default_list'] & @translators.keys 
+    @default_translators = bot.config['translator.default_list'] & @translators.keys
   end
 
   def cmd_translator(m, params)
index 1380550286e82cefb74db79e56f3cb825f55834f..bbae5c59684bbb82b0cf78a425082d956a00238d 100644 (file)
@@ -5,7 +5,7 @@ class TubePlugin < Plugin
   def help(plugin, topic="")
   "tube [district|circle|metropolitan|central|jubilee|bakerloo|waterlooandcity|hammersmithandcity|victoria|eastlondon|northern|piccadilly] => display tube service status for the specified line(Docklands Light Railway is not currently supported)" # , tube stations => list tube stations (not lines) with problems"
   end
-  
+
   def tube(m, params)
     line = params[:line]
     tube_page = @bot.httputil.get('http://www.tfl.gov.uk/tfl/livetravelnews/realtime/tube/default.html')
@@ -45,7 +45,7 @@ class TubePlugin < Plugin
         stations_array.push $1
       end
     }
-    if stations_array.empty? 
+    if stations_array.empty?
       m.reply "There are no station-specific announcements"
       return
     else
index 5da949e4d8787e6532ad3dd91bbd67451d0cfea2..d8f7579c95c45cda0ce9d93480b164f4e260d116 100644 (file)
@@ -71,18 +71,18 @@ class WeatherPlugin < Plugin
   Config.register Config::BooleanValue.new('weather.advisory',
     :default => true,
     :desc => "Should the bot report special weather advisories when any is present?")
-  
+
   def help(plugin, topic="")
     case topic
     when "nws"
       "weather nws <station> => display the current conditions at the location specified by the NOAA National Weather Service station code <station> ( lookup your station code at http://www.nws.noaa.gov/data/current_obs/ )"
     when "station", "wu"
-      "weather [<units>] <location> => display the current conditions at the location specified, looking it up on the Weather Underground site; you can use 'station <code>' to look up data by station code ( lookup your station code at http://www.weatherunderground.com/ ); you can optionally set <units>  to 'metric' or 'english' if you only want data with the units; use 'both' for units to go back to having both." 
+      "weather [<units>] <location> => display the current conditions at the location specified, looking it up on the Weather Underground site; you can use 'station <code>' to look up data by station code ( lookup your station code at http://www.weatherunderground.com/ ); you can optionally set <units>  to 'metric' or 'english' if you only want data with the units; use 'both' for units to go back to having both."
     else
       "weather information lookup. Looks up weather information for the last location you specified. See topics 'nws' and 'wu' for more information"
     end
   end
-  
+
   def initialize
     super
 
@@ -91,7 +91,7 @@ class WeatherPlugin < Plugin
     @wu_url         = "http://mobile.wunderground.com/cgi-bin/findweather/getForecast?brand=mobile%s&query=%s"
     @wu_station_url = "http://mobile.wunderground.com/auto/mobile%s/global/stations/%s.html"
   end
-  
+
   def weather(m, params)
     if params[:where].empty?
       if @registry.has_key?(m.sourcenick)
index a888ad0c3e9d29a9cd9230366bb3ff600a6d1600..b9260170b4997d4d71352145983ce0279cc29b07 100644 (file)
@@ -12,20 +12,20 @@ class WserverPlugin < Plugin
         m.reply "cowardly refusing to follow more than 3 redirects"
         return
       end
-      
+
       begin
         uri = URI.parse(hostname)
       rescue URI::InvalidURIError => err
         m.reply "#{hostname} is not a valid URI"
         return
       end
-      
+
       unless(uri)
         m.reply "incorrect usage: " + help(m.plugin)
         return
       end
-        
-      
+
+
       resp = @bot.httputil.head(uri)
       server = resp['Server']
       if(server && server.length > 0)
@@ -34,7 +34,7 @@ class WserverPlugin < Plugin
         m.reply "couldn't tell what #{uri.host} is running"
       end
 
-      if(resp.code == "302" || resp.code == "301") 
+      if(resp.code == "302" || resp.code == "301")
         newloc = resp['location']
         newuri = URI.parse(newloc)
         # detect and ignore incorrect redirects (to relative paths etc)
index a4bec7088e22be52a6598c25eba6e5dba4695629..f7e41d972f55b1f9b6583664e0b727c49143128c 100644 (file)
@@ -24,7 +24,7 @@ require 'rbot/maskdb'
 #     }
 #   }
 # end
-# 
+#
 
 module Irc
 class Bot
index 3fc794bc6656d701617970a5db04fea4647f32f9..832cbb25e73bf79ff1a080ab29a65ad5857ced4f 100644 (file)
@@ -190,7 +190,7 @@ basics.map "mode :where :what *who",
   :action => 'bot_mode',
   :auth_path => 'talk::do'
 
-basics.map "join :chan :pass", 
+basics.map "join :chan :pass",
   :action => 'bot_join',
   :defaults => {:pass => nil},
   :auth_path => 'move'
index 2ac258d6ffe7f99d4bc665b763ba506713ae1246..31e35452d3d49929d116cd278d574ed0d12ae87d 100644 (file)
@@ -27,7 +27,7 @@ class FiltersModule < CoreBotModule
         msg = _("no known filters")
       end
     else
-      msg = _("known filters: ") << ar.join(", ") 
+      msg = _("known filters: ") << ar.join(", ")
     end
     m.reply msg
   end
@@ -37,7 +37,7 @@ class FiltersModule < CoreBotModule
     if ar.empty?
       msg = _("no known filter groups")
     else
-      msg = _("known filter groups: ") << ar.join(", ") 
+      msg = _("known filter groups: ") << ar.join(", ")
     end
     m.reply msg
   end
index b848947c00d60761ad59b2776fc2605edc57ebca..40266772c70cc6d8cf2e538da546cc60c9a99f5d 100644 (file)
@@ -153,7 +153,7 @@ class IrcLogModule < CoreBotModule
         irclog "@ #{m.source} asked #{who} about #{[m.ctcp, m.message].join(' ')}", logtarget
       end
     else
-      if m.public? 
+      if m.public?
         irclog "<#{m.source}> #{m.logmessage}", m.target
       else
         irclog "<#{m.source}(#{m.sourceaddress})> #{m.logmessage}", m.source
index 7157195f914f72a64c446134a7a7e11dcf72c2b3..2d39d7696b3466be543ca49d2cc36da8b312df92 100644 (file)
@@ -147,7 +147,7 @@ class Bot
     #
     # Presently, the hash returned on success has only one key, :return, whose
     # value is the actual return value of the successfull dispatch.
-    # 
+    #
     # TODO this same kind of mechanism could actually be used in MessageMapper
     # itself to be able to handle the case of multiple plugins having the same
     # 'first word' ...
index 2b142bee701a36d3d94b198ffb6c54f3b9d9a0c5..ced5c1e7fb0eab0bbec478edf62a275a4bc619c8 100644 (file)
@@ -25,7 +25,7 @@ module ::Irc
     #
     # If you have to do large-scale editing of the Bot data Hash,
     # please use with_botdata.
-    # 
+    #
     def set_botdata(key, value=nil, &block)
       Irc::Utils.bot.plugins['userdata'].set_data(self, key, value, &block)
     end
index 68e00ba54ce22c483ee707a7799e6d8ed1dc2f6b..4ea83104ccc51a4d86a1cff0f89afd2995893725 100644 (file)
@@ -99,7 +99,7 @@ module ::Net
         end
       when 'deflate'
         debug "inflating body"
-        # From http://www.koders.com/ruby/fid927B4382397E5115AC0ABE21181AB5C1CBDD5C17.aspx?s=thread: 
+        # From http://www.koders.com/ruby/fid927B4382397E5115AC0ABE21181AB5C1CBDD5C17.aspx?s=thread:
         # -MAX_WBITS stops zlib from looking for a zlib header
         inflater = Zlib::Inflate.new(-Zlib::MAX_WBITS)
         begin
index 8df9626c93ca8f9aab927a0e9ba875cac53b453d..77bdeecfb1cdeebc8a1759a622e148f5076b0be6 100644 (file)
@@ -287,13 +287,13 @@ module ::Irc
         _("%{m} minutes") % { :m => secs/SEC_PER_MIN }
       when secs > 1
         _("%{m} seconds") % { :m => secs }
-      else 
+      else
         _("one second")
       end
     end
 
     # Execute an external program, returning a String obtained by redirecting
-    # the program's standards errors and output 
+    # the program's standards errors and output
     #
     def Utils.safe_exec(command, *args)
       IO.popen("-") { |p|
index 704dafae31f8b5c5a8130199376fe0097bd3b4f2..8b128f1b6e618e7ce597cc5b970b0dbd8eca104a 100644 (file)
@@ -75,7 +75,7 @@ module Irc
 
     def DBHash.create_db(name)
       debug "DBHash: creating empty db #{name}"
-      return BDB::Hash.open(name, nil, 
+      return BDB::Hash.open(name, nil,
       BDB::CREATE | BDB::EXCL, 0600)
     end
 
index 81ea43c657255b72c3d8c83df403f5ac71ebc2b0..4c462bb3cb6486fb5cbcf688e7db9a466a4f5518 100644 (file)
@@ -33,7 +33,7 @@ class Object
 
   # We alias the to_s method to __to_s__ to make
   # it accessible in all classes
-  alias :__to_s__ :to_s 
+  alias :__to_s__ :to_s
 end
 
 # The Irc module is used to keep all IRC-related classes
@@ -542,7 +542,7 @@ class Regexp
     GEN_HOST = /#{HOSTNAME}|#{HOSTADDR}/
 
     # # FreeNode network replaces the host of affiliated users with
-    # # 'virtual hosts' 
+    # # 'virtual hosts'
     # # FIXME we need the true syntax to match it properly ...
     # PDPC_HOST_PART = /[0-9A-Za-z.-]+/
     # PDPC_HOST = /#{PDPC_HOST_PART}(?:\/#{PDPC_HOST_PART})+/
@@ -550,7 +550,7 @@ class Regexp
     # # NOTE: the final optional and non-greedy dot is needed because some
     # # servers (e.g. FreeNode) send the hostname of the services as "services."
     # # which is not RFC compliant, but sadly done.
-    # GEN_HOST_EXT = /#{PDPC_HOST}|#{GEN_HOST}\.??/ 
+    # GEN_HOST_EXT = /#{PDPC_HOST}|#{GEN_HOST}\.??/
 
     # Sadly, different networks have different, RFC-breaking ways of cloaking
     # the actualy host address: see above for an example to handle FreeNode.
@@ -1350,7 +1350,7 @@ module Irc
     # Adds a user to the channel
     #
     def add_user(user, opts={})
-      silent = opts.fetch(:silent, false) 
+      silent = opts.fetch(:silent, false)
       if has_user?(user)
         warn "Trying to add user #{user} to channel #{self} again" unless silent
       else
index 67114dac58277eb176b8340317a86f0901252c65..cb08324409a468f4aa0d6361bbc10f54482ce904 100644 (file)
@@ -57,16 +57,16 @@ class Bot
       return 'english'
     end
 
-    Config.register Config::EnumValue.new('core.language', 
+    Config.register Config::EnumValue.new('core.language',
       :default => Irc::Bot::Language.from_locale, :wizard => true,
       :values => Proc.new{|bot|
             Dir.new(Config::datadir + "/languages").collect {|f|
               f =~ /\.lang$/ ? f.gsub(/\.lang$/, "") : nil
             }.compact
-          },   
+          },
       :on_change => Proc.new {|bot, v| bot.lang.set_language v},
       :desc => "Which language file the bot should use")
-    
+
     def initialize(bot, language)
       @bot = bot
       set_language language
index 4da511ed8dc944fdec5a1fdec04840c4cf9b6601..64c4b6bbd95e94aed368e5290cdfc44440078ac7 100644 (file)
@@ -86,7 +86,7 @@ module Irc
             data
           end
       if ColorCode.key?(f)
-        ColorCode[f] 
+        ColorCode[f]
       else
         0
       end
index b6125538b49b1ba24be54ead551c42b9511181f6..9501ac592e6265d8f8f5a08ed530f2bcc0cbffa7 100644 (file)
@@ -144,7 +144,7 @@ class Bot
     # threaded::
     #   a boolean (defaults to false) that determines whether the action should be
     #   called in a separate thread.
-    #   
+    #
     #
     # Further examples:
     #
index 9d5523e423c9f2a562e588666d1d46787d96a825..e099e18e7273020cc9742bde0436b9187939f017 100644 (file)
@@ -198,7 +198,7 @@ module Plugins
       @priority ||= 1
     end
 
-    # Returns the symbol :BotModule 
+    # Returns the symbol :BotModule
     def botmodule_class
       :BotModule
     end
@@ -318,7 +318,7 @@ module Plugins
     #
     # This command is now superceded by the #map() command, which should be used
     # instead whenever possible.
-    # 
+    #
     def register(cmd, opts={})
       raise ArgumentError, "Second argument must be a hash!" unless opts.kind_of?(Hash)
       who = @manager.who_handles?(cmd)
@@ -341,7 +341,7 @@ module Plugins
       m.reply(_("incorrect usage, ask for help using '%{command}'") % {:command => "#{@bot.nick}: help #{m.plugin}"})
     end
 
-    # Define the priority of the module.  During event delegation, lower 
+    # Define the priority of the module.  During event delegation, lower
     # priority modules will be called first.  Default priority is 1
     def priority=(prio)
       if @priority != prio
@@ -812,7 +812,7 @@ module Plugins
     end
 
     def sort_modules
-      @sorted_modules = (core_modules + plugins).sort do |a, b| 
+      @sorted_modules = (core_modules + plugins).sort do |a, b|
         a.priority <=> b.priority
       end || []
 
index aafa9be2248a8a2ad9199e45847b2fb2fb0598ec..8e2a6a4a656476c2ab01bbca12cbaa863ebf135c 100644 (file)
@@ -62,7 +62,7 @@ class Timer
       @repeat = opts[:repeat] if opts.include? :repeat
 
       if block_given?
-        @block = block 
+        @block = block
       elsif opts[:code]
         @block = opts[:code]
       end
index 975107e3ca25fd5ae7b201e10915d18a8370a6c4..cbc31510ba3eed83a8bd74c8bb7aaf0c9d7f217b 100755 (executable)
@@ -10,7 +10,7 @@
 # The purpose is to provide a workaround for ruby-gettext, which treats empty output
 # from msgmerge as error in the po file, where it should mean that no modification
 # is needed to the defpo. For updates on the issue follow
-# http://rubyforge.org/pipermail/gettext-users-en/2008-June/000094.html 
+# http://rubyforge.org/pipermail/gettext-users-en/2008-June/000094.html
 
 
 msgmerge = ENV['REAL_MSGMERGE_PATH'] || 'msgmerge'
index 994db25eba61018f4e24f85af8f1668885b92e70..277accc6c7f7f41fd07ebc6f47a7e68212f61a3c 100755 (executable)
--- a/setup.rb
+++ b/setup.rb
@@ -660,7 +660,7 @@ module FileOperations
   def ruby(*args)
     command config('rubyprog'), *args
   end
-  
+
   def make(task = nil)
     command(*[config('makeprog'), task].compact)
   end
@@ -723,7 +723,7 @@ module HookScriptAPI
   def srcdirectory?(path)
     File.dir?(srcfile(path))
   end
-  
+
   def srcfile?(path)
     File.file?(srcfile(path))
   end
@@ -827,7 +827,7 @@ class ToplevelInstaller
       __send__ "exec_#{task}"
     end
   end
-  
+
   def run_metaconfigs
     @config.load_script "#{@ardir}/metaconfig"
   end
@@ -1405,7 +1405,7 @@ class Installer
   end
 
   # picked up many entries from cvs-1.11.1/src/ignore.c
-  JUNK_FILES = %w( 
+  JUNK_FILES = %w(
     core RCSLOG tags TAGS .make.state
     .nse_depinfo #* .#* cvslog.* ,* .del-* *.olb
     *~ *.old *.bak *.BAK *.orig *.rej _$* *$
index b5d3450f373c8866b7e1cbe9badc05e9b98268c8..ab66a62d60d9f36e6e2c5f86ee7d701396732123 100644 (file)
@@ -46,7 +46,7 @@ class PluginsPriorityTest < Test::Unit::TestCase
     @mock3 = MockModule.new(3)
     @mock4 = MockModule.new(4)
     @mock5 = MockModule.new(5)
-      
+
     # This whole thing is a PITA because PluginManagerClass is a singleton
     unless @@manager
       @@manager = PluginManagerClass.instance
@@ -63,7 +63,7 @@ class PluginsPriorityTest < Test::Unit::TestCase
     @@manager.instance_eval { @sort_call_count = nil }
     @@manager.mark_priorities_dirty
 
-    # We add the modules to the lists in the wrong order 
+    # We add the modules to the lists in the wrong order
     # on purpose to make sure the sort is working
     @@manager.plugins.clear
     @@manager.core_modules.clear
@@ -81,7 +81,7 @@ class PluginsPriorityTest < Test::Unit::TestCase
     dlist << @mock2
     dlist << @mock5
   end
-    
+
   def test_default_priority
     plugin = TestRealBotModule.new
     assert_equal 1, plugin.priority
index f8c64a4ace8409c68e73145bf2a51dfc8bdd707e..8e92a095e9cc319bb2579746c77aa3300b33c275 100644 (file)
@@ -55,7 +55,7 @@ class PluginsPriorityTest < Test::Unit::TestCase
     @mock3 = MockModule.new(3)
     @mock4 = MockModule.new(4)
     @mock5 = MockModule.new(5)
-      
+
     # This whole thing is a PITA because PluginManagerClass is a singleton
     unless @@manager
       @@manager = PluginManagerClass.instance
@@ -73,7 +73,7 @@ class PluginsPriorityTest < Test::Unit::TestCase
     @@manager.instance_eval { @sort_call_count = nil }
     @@manager.mark_priorities_dirty
 
-    # We add the modules to the lists in the wrong order 
+    # We add the modules to the lists in the wrong order
     # on purpose to make sure the sort is working
     @@manager.plugins.clear
     @@manager.core_modules.clear
@@ -91,7 +91,7 @@ class PluginsPriorityTest < Test::Unit::TestCase
     dlist << @mock2
     dlist << @mock5
   end
-    
+
   def test_above
     @@manager.delegate_event('test', :above => 3)
 
@@ -101,7 +101,7 @@ class PluginsPriorityTest < Test::Unit::TestCase
     assert_equal 1, @mock4.test_called_at.size
     assert_equal 1, @mock5.test_called_at.size
   end
-    
+
   def test_below
     @@manager.delegate_event('test', :below => 3)