Source for file install.class.php
Documentation is available at install.class.php
* Do installing bot. True if install is not complete;
if (!yn("\r\nIt seems, that ". VER. " not installed.\r\n\r\nWould you like to install it now (y,n)?: "))
return o("\r\nI can't go on. Sorry. Please, do install.\r\n");
o("\r\nOk, Let's start.\r\n");
o("\r\nFirstly, enter BOT's ICQ number (uin): ");
if (yn("\r\nDo you want to exit installation (y,n)? "))
o("\r\nIt not seems, that you enter ICQ Number. UIN must be 5 to 9 numbers length. Try one more time or hit enter to exit\r\n");
o("OK. I write it down. BOT's ICQ number is $uin\r\n");
o("\r\nEnter BOT's ICQ password: ");
if (yn("Are you sure, that you've got empty password (y,n)? "))
o("OK. I write BOT's password. Let's go on.\r\n");
o("\r\nEnter BOT's Admin's ICQ number (adminuin): ");
if (yn("\r\nDo you want to exit installation (y,n)? "))
o("\r\nIt not seems, that you enter ICQ Number. UIN must be 5 to 9 numbers length. Try one more time or hit enter to exit\r\n");
o("OK. I write it down. BOT's Admin's ICQ number is $adminuin\r\n");
o("\r\nOK. Config done.\r\n");
o("Now I'll try to write down your information.\r\n\r\n");
if (file_exists('./config.inc.php') && (!yn('Config file already exists. Overwrite (y,n)?')))
return o("\r\nSorry, we can't continue.\r\nConfig already exists, but it seems that it was corrupted.\r\nTry to edit config.inc.php manually or overwrite it with this installer.\r\n\r\n");
o("Saving to config.inc.php... ");
$fp= @fopen('./config.inc.php','w');
return o("error\r\nSorry, I can't write to config.inc.php. Check permissions.\r\n");
define('LOGLEVEL', LOGLEVEL_1);
define('PASSWORD', '$pass');
define('ADMINUIN', '$adminuin');
define('STARTSTATUS', 'STATUS_FREE4CHAT');
define('CMD_PREF','!');"))
return o("error\r\nStrange, I can't write down configuration... Check permissions.\r\n");
o("OK\r\nHmm.. We almost finished!\r\n");
o("Now I'm going to make $adminuin super user.\r\nGiving role ADMIN to: $adminuin...");
$user->addRoles('admin');
o("OK\r\n\r\nFinished\r\n");
if (!yn("\r\nDo you want to start BOT now (y,n)?"))
return o("\r\nOK, see you.\r\n");
o("Trying to start!\r\n\r\n");
function i($nocase= false)
return substr(i(true),0,1) == 'y'? true: false;
|