From 901141d6acbf37f7724562f097c032db71f78453 Mon Sep 17 00:00:00 2001 From: Tom Gilbert Date: Wed, 24 Aug 2005 21:26:02 +0000 Subject: 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. --- lib/rbot/ircbot.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/rbot') 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 -- cgit v1.2.3