Fixed the config to be less sketchy, might need to go over to a real system that isn't dumb

master
Silverwizard 10 years ago
parent 65615d08ab
commit 7359f2338c
  1. 1
      config.rb

@ -10,4 +10,5 @@ password = gets
print "dbname: "
dbname = gets
config.print("begin\nraise 'DB Error' unless $my = Mysql.connect('" + hostname.strip + "', '" + username.strip + "', '" + password.strip + "', '" + dbname.strip + "')\n")
config.print("unless $my.list_tables.include?('rolls')\nstatement = $my.prepare('CREATE TABLE rolls (id INT, roll TEXT, result TEXT, user TEXT, game TEXT)');\nstatement.execute\nend\n")
config.print("rescue\nprint 'Please double check db settings or contact the administrator'\nend")

Loading…
Cancel
Save