summaryrefslogtreecommitdiff
path: root/lib/rbot
diff options
context:
space:
mode:
authorDavid Gadling <dave@toasterwaffles.com>2009-05-21 11:53:19 -0700
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-05-21 22:09:28 +0200
commit7f244f32d974cafa74f449853f940f194d08d6d2 (patch)
treeb72684ce149254edaf2dba993c409a640cc43086 /lib/rbot
parentd8fd18fe30013ba7705aaeb5dd4521cbe013b824 (diff)
multiple plugins: Changes to remove parenthesize warnings.
All of these modules/plugins were generating warnings like this: warning: parenthesize argument(s) for future version This patch should fix all the warnings without affecting functionality.
Diffstat (limited to 'lib/rbot')
-rw-r--r--lib/rbot/core/irclog.rb4
-rw-r--r--lib/rbot/ircbot.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/rbot/core/irclog.rb b/lib/rbot/core/irclog.rb
index 40266772..f60bcbfa 100644
--- a/lib/rbot/core/irclog.rb
+++ b/lib/rbot/core/irclog.rb
@@ -47,7 +47,7 @@ class IrcLogModule < CoreBotModule
end
def timestamp(time)
- return time.strftime @bot.config['irclog.timestamp_format']
+ return time.strftime(@bot.config['irclog.timestamp_format'])
end
def event_irclog_list_changed(nolist, dolist)
@@ -289,7 +289,7 @@ class IrcLogModule < CoreBotModule
# If it's a file, we rename to filename.old.filedate
up = dir.dup
until File.exist? up
- up.replace File.dirname up
+ up.replace(File.dirname(up))
end
unless File.directory? up
backup = up.dup
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb
index 70be2a90..2825f7e6 100644
--- a/lib/rbot/ircbot.rb
+++ b/lib/rbot/ircbot.rb
@@ -789,7 +789,7 @@ class Bot
missing = Dir.chdir(template_dir) { Dir.glob('*/**') } - Dir.chdir(@botclass) { Dir.glob('*/**') }
missing.map do |f|
dest = File.join(@botclass, f)
- FileUtils.mkdir_p(File.dirname dest)
+ FileUtils.mkdir_p(File.dirname(dest))
FileUtils.cp File.join(template_dir, f), dest
end
else