Am I allowed to share the source code of the server Lucila?
Why you need his permissions? Make some people happy and release it.
10-09-13
Lucila
Re: [Release]pokenet+pokemonium (server+client)
@sniperOmicron indeed you have it?
@hillbill go to habbo forum , fan..
11-09-13
andsnake
Re: [Release]pokenet+pokemonium (server+client)
guys chill out ... we are all part of the same community... if Lucila decides to release the source then so be it( i dont deem it right for any of us who Lucila shared the source with, to released it as it is not ours in the first place..). I agree that having the source could help in improving the files as the community has really good coders as members, but it is up to the person who bought it in the end.
We could however( if there is enough response from the members and if Lucila agrees to it) create a team that works on the files and have a git/svn where normal users can download newest updates the team does on the files or/and contribute with their own fixes to the git/svn, but that it's only my personal opinion...
11-09-13
SniperOmicron
Re: [Release]pokenet+pokemonium (server+client)
Quote:
Originally Posted by HillBilly
Why you need his permissions? Make some people happy and release it.
It is because I know how it feels if your source codes get released without permissions.
public GameServer(boolean autorun) {
if (autorun) {
if (m_boolGui) {
createGui();
}
loadSettings();
} else if (m_boolGui) {
loadSettings();
createGui();
} else {
ConsoleReader r = new ConsoleReader();
System.out.println("Load Settings? Y/N");
String answer = r.readToken();
if ((answer.contains("y")) || (answer.contains("Y"))) {
loadSettings();
} else {
getConsoleSettings();
}
}
start();
}
public void updatePlayerCount() {
if (m_boolGui) {
int amount = ActiveConnections.getActiveConnections();
this.m_pAmount.setText(amount + " players online");
if (amount > this.m_highest) {
this.m_highest = amount;
this.m_pHighest.setText("Highest: " + amount);
}
} else {
int amount = ActiveConnections.getActiveConnections();
System.out.println(amount + " players online");
if (amount > this.m_highest) {
this.m_highest = amount;
System.out.println("Highest: " + amount);
}
}
}
public static String getDatabaseHost() {
return m_dbServer;
}
public static String getDatabaseName() {
return m_dbName;
}
public static String getDatabasePassword() {
return m_dbPassword;
}
public static String getDatabaseUsername() {
return m_dbUsername;
}
public static GameServer getInstance() {
return m_instance;
}
public static void initGameServer(boolean autorun) {
m_instance = new GameServer(autorun);
}
public static int getMaxPlayers() {
return m_maxPlayers;
}
public static int getPort() {
return m_port;
}
public static String getServerName() {
return m_serverName;
}
public static ServiceManager getServiceManager() {
return m_serviceManager;
}
public static void main(String[] args) {
try {
PrintStream p = new PrintStream(new File("./errors.txt"));
System.setErr(p);
} catch (Exception e) {
e.printStackTrace();
}
Options options = new Options();
options.addOption("p", "players", true, "Sets the max number of players.");
options.addOption("port", "port", true, "Sets the serverport.");
options.addOption("ng", "nogui", false, "Starts server in headless mode.");
options.addOption("ar", "autorun", false, "Runs without asking a single question.");
options.addOption("h", "help", false, "Shows this menu.");
options.addOption("rates", "serverrates", true, "Gives the file to be used for server rates config");
if (args.length > 0) {
CommandLineParser parser = new GnuParser();
try {
CommandLine line = parser.parse(options, args);
if (line.hasOption("players")) {
m_maxPlayers = Integer.parseInt(line.getOptionValue("players"));
if (m_maxPlayers < 1) {
m_maxPlayers = 500;
}
}
if (line.hasOption("port")) {
m_port = Integer.parseInt(line.getOptionValue("port"));
}
if (line.hasOption("help")) {
HelpFormatter formatter = new HelpFormatter();
System.err.println("Server requires a settings parameter");
formatter.printHelp("java GameServer [param] <args>", options);
}
if (!line.hasOption("nogui")) {
m_boolGui = true;
}
if (line.hasOption("rates")) {
String rates = line.getOptionValue("rates");
Ini ratesIni = new Ini(new FileInputStream(rates));
Ini.Section s = (Ini.Section) ratesIni.get("RATES");
RATE_GOLD = Double.parseDouble((String) s.get("GOLD"));
RATE_EXP_POKE = Double.parseDouble((String) s.get("EXP_POKE"));
RATE_EXP_TRAINER = Double.parseDouble((String) s.get("EXP_TRAINER"));
}
this.m_dbP = new JPasswordField();
this.m_dbP.setSize(128, 24);
this.m_dbP.setText("Pass");
this.m_dbP.setLocation(4, 224);
this.m_gui.getContentPane().add(this.m_dbP);
this.m_name = new JTextField();
this.m_name.setSize(128, 24);
this.m_name.setText("Your Server Name");
this.m_name.setLocation(4, 260);
this.m_gui.getContentPane().add(this.m_name);
File f = new File("res/settings.txt");
if (f.exists()) {
try {
Scanner s = new Scanner(f);
this.m_dbS.setText(s.nextLine());
this.m_dbN.setText(s.nextLine());
this.m_dbU.setText(s.nextLine());
this.m_dbP.setText(s.nextLine());
this.m_name.setText(s.nextLine());
s.close();
} catch (Exception e) {
e.printStackTrace();
}
}
this.m_gui.setVisible(true);
}
private void exit() {
if ((m_boolGui) && (this.m_stop.isEnabled())) {
JOptionPane.showMessageDialog(null, "You must stop the server before exiting.");
} else {
MySqlManager.getInstance().close();
System.exit(0);
}
}
private void getConsoleSettings() {
ConsoleReader r = new ConsoleReader();
System.out.println("Please enter the required information.");
System.out.println("Database Server: ");
m_dbServer = r.readToken();
System.out.println("Database Name:");
m_dbName = r.readToken();
System.out.println("Database Username:");
m_dbUsername = r.readToken();
System.out.println("Database Password:");
m_dbPassword = r.readToken();
System.out.println("This server's IP or hostname:");
m_serverName = r.readToken();
System.out.println("Save info? (Y/N)");
String answer = r.readToken();
if ((answer.contains("y")) || (answer.contains("Y"))) {
saveSettings();
}
System.out.println();
System.err.println("WARNING: When using -nogui, the server should only be shut down using a master client");
}
this source is at the vary beginning of our conversion to 1.7 so no matter what one you use your going to run into issues with the source. Not working with one or the other.