diff --git a/database.php b/database.php index 3181328..ac034fd 100644 --- a/database.php +++ b/database.php @@ -61,6 +61,13 @@ class mxDatabase create_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, last_modified TIMESTAMP DEFAULT CURRENT_TIMESTAMP )"); + // make sure the bot is allowed to login + require_once("config.php"); + $password = $this->addUser("Register", "Bot", "register_bot", $register_email); + $config["register_password"] = $password; + $myfile = fopen("config.json", "w"); + fwrite($myfile, json_encode($config, JSON_PRETTY_PRINT)); + fclose($myfile); } else { // establish connection