summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/botuser.rb2
-rw-r--r--lib/rbot/core/basics.rb2
-rw-r--r--lib/rbot/core/filters_ui.rb4
-rw-r--r--lib/rbot/core/irclog.rb2
-rw-r--r--lib/rbot/core/remote.rb2
-rw-r--r--lib/rbot/core/userdata.rb2
-rw-r--r--lib/rbot/core/utils/httputil.rb2
-rw-r--r--lib/rbot/core/utils/utils.rb4
-rw-r--r--lib/rbot/dbhash.rb2
-rw-r--r--lib/rbot/irc.rb8
-rw-r--r--lib/rbot/language.rb6
-rw-r--r--lib/rbot/message.rb2
-rw-r--r--lib/rbot/messagemapper.rb2
-rw-r--r--lib/rbot/plugins.rb8
-rw-r--r--lib/rbot/timer.rb2
15 files changed, 25 insertions, 25 deletions
diff --git a/lib/rbot/botuser.rb b/lib/rbot/botuser.rb
index a4bec708..f7e41d97 100644
--- a/lib/rbot/botuser.rb
+++ b/lib/rbot/botuser.rb
@@ -24,7 +24,7 @@ require 'rbot/maskdb'
# }
# }
# end
-#
+#
module Irc
class Bot
diff --git a/lib/rbot/core/basics.rb b/lib/rbot/core/basics.rb
index 3fc794bc..832cbb25 100644
--- a/lib/rbot/core/basics.rb
+++ b/lib/rbot/core/basics.rb
@@ -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'
diff --git a/lib/rbot/core/filters_ui.rb b/lib/rbot/core/filters_ui.rb
index 2ac258d6..31e35452 100644
--- a/lib/rbot/core/filters_ui.rb
+++ b/lib/rbot/core/filters_ui.rb
@@ -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
diff --git a/lib/rbot/core/irclog.rb b/lib/rbot/core/irclog.rb
index b848947c..40266772 100644
--- a/lib/rbot/core/irclog.rb
+++ b/lib/rbot/core/irclog.rb
@@ -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
diff --git a/lib/rbot/core/remote.rb b/lib/rbot/core/remote.rb
index 7157195f..2d39d769 100644
--- a/lib/rbot/core/remote.rb
+++ b/lib/rbot/core/remote.rb
@@ -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' ...
diff --git a/lib/rbot/core/userdata.rb b/lib/rbot/core/userdata.rb
index 2b142bee..ced5c1e7 100644
--- a/lib/rbot/core/userdata.rb
+++ b/lib/rbot/core/userdata.rb
@@ -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
diff --git a/lib/rbot/core/utils/httputil.rb b/lib/rbot/core/utils/httputil.rb
index 68e00ba5..4ea83104 100644
--- a/lib/rbot/core/utils/httputil.rb
+++ b/lib/rbot/core/utils/httputil.rb
@@ -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
diff --git a/lib/rbot/core/utils/utils.rb b/lib/rbot/core/utils/utils.rb
index 8df9626c..77bdeecf 100644
--- a/lib/rbot/core/utils/utils.rb
+++ b/lib/rbot/core/utils/utils.rb
@@ -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|
diff --git a/lib/rbot/dbhash.rb b/lib/rbot/dbhash.rb
index 704dafae..8b128f1b 100644
--- a/lib/rbot/dbhash.rb
+++ b/lib/rbot/dbhash.rb
@@ -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
diff --git a/lib/rbot/irc.rb b/lib/rbot/irc.rb
index 81ea43c6..4c462bb3 100644
--- a/lib/rbot/irc.rb
+++ b/lib/rbot/irc.rb
@@ -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
diff --git a/lib/rbot/language.rb b/lib/rbot/language.rb
index 67114dac..cb083244 100644
--- a/lib/rbot/language.rb
+++ b/lib/rbot/language.rb
@@ -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
diff --git a/lib/rbot/message.rb b/lib/rbot/message.rb
index 4da511ed..64c4b6bb 100644
--- a/lib/rbot/message.rb
+++ b/lib/rbot/message.rb
@@ -86,7 +86,7 @@ module Irc
data
end
if ColorCode.key?(f)
- ColorCode[f]
+ ColorCode[f]
else
0
end
diff --git a/lib/rbot/messagemapper.rb b/lib/rbot/messagemapper.rb
index b6125538..9501ac59 100644
--- a/lib/rbot/messagemapper.rb
+++ b/lib/rbot/messagemapper.rb
@@ -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:
#
diff --git a/lib/rbot/plugins.rb b/lib/rbot/plugins.rb
index 9d5523e4..e099e18e 100644
--- a/lib/rbot/plugins.rb
+++ b/lib/rbot/plugins.rb
@@ -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 || []
diff --git a/lib/rbot/timer.rb b/lib/rbot/timer.rb
index aafa9be2..8e2a6a4a 100644
--- a/lib/rbot/timer.rb
+++ b/lib/rbot/timer.rb
@@ -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