forked from 2009Scape/Server
update database, default clan, sql stuff
This commit is contained in:
parent
13171d3d78
commit
0c326b548e
7 changed files with 130 additions and 329 deletions
|
|
@ -10,6 +10,11 @@ import org.keldagrim.system.OperatingSystem;
|
|||
*/
|
||||
public final class ServerConstants {
|
||||
|
||||
/**
|
||||
* The port to be used for communications.
|
||||
*/
|
||||
public static final String SERVER_NAME = "RS 2009";
|
||||
|
||||
/**
|
||||
* The port to be used for communications.
|
||||
*/
|
||||
|
|
@ -49,12 +54,14 @@ public final class ServerConstants {
|
|||
* The administrators.
|
||||
*/
|
||||
public static final String[] ADMINISTRATORS = {
|
||||
"ethan",
|
||||
"austin",
|
||||
"ethan",
|
||||
"austin",
|
||||
"redsparr0w",
|
||||
};
|
||||
|
||||
public static final String[] DATABASE_NAMES = {
|
||||
"keldagr1_server", "keldagr1_global"
|
||||
"server",
|
||||
"global",
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -24,11 +24,6 @@ public class Constants {
|
|||
*/
|
||||
public static final String CACHE_NAME = File.separator + ".keldagrim_530";
|
||||
|
||||
/**
|
||||
* Management Server
|
||||
*/
|
||||
public static final String MANAGEMENT_SERVER = "management.keldagrim.com";
|
||||
|
||||
/**
|
||||
* Gets the screen coordinates to place panels in the center
|
||||
* @param {Dimension} the panel size, null to use default frame size
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package org.keldagrim.net.packet;
|
|||
import java.nio.ByteBuffer;
|
||||
import java.util.List;
|
||||
|
||||
import org.crandor.game.world.GameWorld;
|
||||
import org.keldagrim.ServerConstants;
|
||||
import org.keldagrim.net.IoSession;
|
||||
import org.keldagrim.system.PunishmentStorage;
|
||||
|
|
@ -14,6 +15,7 @@ import org.keldagrim.world.PlayerSession;
|
|||
import org.keldagrim.world.WorldDatabase;
|
||||
import org.keldagrim.world.info.Response;
|
||||
import org.keldagrim.world.info.UIDInfo;
|
||||
import org.keldagrim.world.info.WorldInfo;
|
||||
|
||||
/**
|
||||
* Repository class for world packets.
|
||||
|
|
@ -54,6 +56,14 @@ public final class WorldPacketRepository {
|
|||
player.getWorld().getSession().write(buffer);
|
||||
}
|
||||
|
||||
public static void sendPlayerMessage(PlayerSession player, String[] messages) {
|
||||
if (player == null) {
|
||||
return;
|
||||
}
|
||||
for (String message : messages)
|
||||
sendPlayerMessage(player, message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends the contact information.
|
||||
* @param player The player.
|
||||
|
|
@ -430,7 +440,7 @@ public final class WorldPacketRepository {
|
|||
}
|
||||
ClanRepository clan = ClanRepository.get(server, clanName);
|
||||
if (clan == null) {
|
||||
sendPlayerMessage(player, "The channel you tried to join does not exist. Try joining the main clan named 'Keldagrim'.:clan:");
|
||||
sendPlayerMessage(player, new String[]{ "The channel you tried to join does not exist.", "Try joining the main clan named '" + ServerConstants.SERVER_NAME + "'.:clan:" });
|
||||
return;
|
||||
}
|
||||
clan.enter(player);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue