summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTom Gilbert <tom@linuxbrit.co.uk>2005-08-24 21:26:02 +0000
committerTom Gilbert <tom@linuxbrit.co.uk>2005-08-24 21:26:02 +0000
commit901141d6acbf37f7724562f097c032db71f78453 (patch)
treed89f70c0fd93927d810b943bebde7ea9be67e23a /lib
parentdb0959ad0f4ad86abb780a40cbb551f84ba90caf (diff)
egads, Etc.getlogin returns the real login, so if you su to another user and
run rbot, it'll still use you homedir. I am getting really pissed with the complete lack of documentation I keep running into :/ The Etc module is *completely* undocumented, for example.
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/ircbot.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb
index d59d7cd3..8cdde814 100644
--- a/lib/rbot/ircbot.rb
+++ b/lib/rbot/ircbot.rb
@@ -120,7 +120,8 @@ class IrcBot
exit 2
end
- botclass = "#{Etc.getpwnam(Etc.getlogin).dir}/.rbot" unless botclass
+ #botclass = "#{Etc.getpwnam(Etc.getlogin).dir}/.rbot" unless botclass
+ botclass = "#{ENV['HOME']}/.rbot" unless botclass
@botclass = botclass.gsub(/\/$/, "")
unless FileTest.directory? botclass