Quick'n dirty hack to remove hardcoded paths
authorMikael Berthe <mikael@lilotux.net>
Tue, 27 Nov 2012 16:36:17 +0100
changeset 67 5c756a9d7d8c
parent 66 d9c00a9fe9d5
child 68 840820d02016
Quick'n dirty hack to remove hardcoded paths
mcabbot.lua
mcbot/cmds/bofh.lua
mcbot/cmds/rfc.lua
mcbot/cmds/wtf.lua
--- a/mcabbot.lua	Tue Nov 27 16:26:04 2012 +0100
+++ b/mcabbot.lua	Tue Nov 27 16:36:17 2012 +0100
@@ -13,8 +13,8 @@
 
 local home = os.getenv("HOME")
 package.path = package.path..
-                ";"..home.."/.mcabber/lua/?.lua"..
-                ";"..home.."/.mcabber/lua/mcbot/?.lua"
+                ";"..home.."/.mcabber/mcabbot/?.lua"..
+                ";"..home.."/.mcabber/mcabbot/mcbot/?.lua"
 home = nil
 
 require "mcbot.mcbot_engine"
--- a/mcbot/cmds/bofh.lua	Tue Nov 27 16:26:04 2012 +0100
+++ b/mcbot/cmds/bofh.lua	Tue Nov 27 16:36:17 2012 +0100
@@ -1,5 +1,7 @@
 
-local excusefile = "/home/mikael/.mcabber/lua/mcbot/bofh_excuses.txt"
+local home = os.getenv("HOME")
+local excusefile = home.."/.mcabber/mcabbot/mcbot/bofh_excuses.txt"
+home = nil
 
 local bofh = { ["desc"] = "Give a BOFH excuse",
                ["aliases"] = { "excuse" } }
--- a/mcbot/cmds/rfc.lua	Tue Nov 27 16:26:04 2012 +0100
+++ b/mcbot/cmds/rfc.lua	Tue Nov 27 16:36:17 2012 +0100
@@ -15,7 +15,9 @@
 
 -- TXT index database, retrieved from
 -- <ftp://ftp.rfc-editor.org/in-notes/rfc-index.txt>
-local indexfname = "/home/mikael/.mcabber/lua/mcbot/rfc-index.txt"
+local home = os.getenv("HOME")
+local indexfname = home.."/.mcabber/mcabbot/mcbot/rfc-index.txt"
+home = nil
 
 local urlbase = "http://tools.ietf.org/html/rfc"
 
--- a/mcbot/cmds/wtf.lua	Tue Nov 27 16:26:04 2012 +0100
+++ b/mcbot/cmds/wtf.lua	Tue Nov 27 16:36:17 2012 +0100
@@ -12,7 +12,9 @@
 -- Please check the license in the COPYING file at the root of the tree.
 --
 
-local wtfdbfile = "/home/mikael/.mcabber/lua/mcbot/wtfdb.txt"
+local home = os.getenv("HOME")
+local wtfdbfile = home.."/.mcabber/mcabbot/mcbot/wtfdb.txt"
+home = nil
 
 local wtf = { ["desc"] = "Acronym dictionary" }