Professional Documents
Culture Documents
Connection;
import java.sql.DriverManager;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.Properties;
/*
public static void calcTime() {
long curTime = System.currentTimeMillis();
updateSeconds = 180 - ((int) (curTime - startTime) / 1000);
if (updateSeconds == 0) {
shutdownServer = true;
}
}
*/
public static void calcTime() {
long curTime = System.currentTimeMillis();
updateSeconds = 1800 - ((int) (curTime - startTime) / 1800);
if (updateSeconds == 0) {
shutdownServer = true;
}
}
public static void createConnection()
{
try
{
Class.forName("com.mysql.jdbc.driver").newInstance();
conn = driverManager.getConnection(MySQLURL, MySQLUser,
MySQLPassword);
misc.println("Connected to SQL Database");
}
catch(Exception exception)
{
exception.printStackTrace();
}
}
public server() {
// the current way of controlling the server at runtime and a great
// debugging/testing tool
// jserv js = new jserv(this);
// js.start();
if (checkLog("ipbans", host)) {
System.out.println("They are in ip ban list!");
return false; // ip ban added by bakatool
}
return true;
}