summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTom Gilbert <tom@linuxbrit.co.uk>2005-07-27 17:50:49 +0000
committerTom Gilbert <tom@linuxbrit.co.uk>2005-07-27 17:50:49 +0000
commit39b8ac0ed06c32aa72142acda04a27b8404f5560 (patch)
treea130bf2eeb801ce85e8795c90cc94fc1de094c3e /lib
parent67dc860e5fbcdac31ccdbc1d561a4e583dd5a084 (diff)
post config script to persist configuration from the script
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/post-config.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/rbot/post-config.rb b/lib/rbot/post-config.rb
new file mode 100644
index 00000000..974ebd0e
--- /dev/null
+++ b/lib/rbot/post-config.rb
@@ -0,0 +1,8 @@
+# write out our datadir so we can reference it at runtime
+File.open('rbotconfig.rb', "w") {|f|
+ f.puts "module Irc"
+ f.puts " module Config"
+ f.puts " DATADIR = '#{config('datadir')}'"
+ f.puts " end"
+ f.puts "end"
+}