넷빈을 이용하여 Pack의 src를 불러온 후 Constants > ServerConstants 파일 내
아래 부분을 수정합니다.
파란색 부분을 추가하시면 됩니다.
적용 시 GM권한이 없는 IP에서 GM권한을 가진 계정으로 접속할 경우 계정 내의 모든 케릭터가 보이지 않게 됩니다.
GM권한이 없는 IP에서 GM권한을 가진 케릭터-계정 자체에는 권한이 없을 경우-도 보이지 않습니다.
|
public static boolean isIPLocalhost(final String sessionIP) {
return localhostIP.contains(sessionIP.replace("/", "")) && ServerConstants.Use_Localhost;
}
static {
localhostIP.add("내 서버의 IP");
}
//Packeges.constants.localhostIP.remove("내 서버의 IP");
public static ServerConstants instance;
public void run() {
updateIP();
}
public void updateIP() {
eligibleIP.clear();
final String[] eligibleIPs = {"GM권한을 주고 싶은 IP"};
for (int i = 0; i < eligibleIPs.length; i++) {
try {
eligibleIP.add(InetAddress.getByName(eligibleIPs[i]).getHostAddress().replace("/", ""));
} catch (Exception e) {
}
}
}
public static void registerMBean() {
MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
try {
instance = new ServerConstants();
instance.updateIP();
mBeanServer.registerMBean(instance, new ObjectName("constants:type=ServerConstants"));
} catch (Exception e) {
System.out.println("Error registering Shutdown MBean");
e.printStackTrace();
}
}
}
|
rehab21 님의 최근 댓글
답변 감사드립니다. 말씀처럼 넷빈에 추가를 했어요. 핸들링.로그인.핸들러 는 이미 존재하고 있어서 그 안에 AutoRegister라는 클래스를 생성했고, http://gamezone.one/index.php?mid=board_RYMI94&search_keyword=%EC%98%A4%ED%86%A0%EB%A0%88%EC%A7%80%EC%8A%A4%ED%84%B0&search_target=title_content&document_srl=286894 게시글에 있는 것 처럼 내용 붙혀넣기 하고 public static boolean getAccountExists(String login) { 부분을 public static boolean getAccountExists(String login) throws SQLException { 로 변경했는데요. 일단 해당 코드가 뭔가 잘못된건지.. 아래 그림처럼 hexsha1 부분이 에러가 나서 빌드가 실패하더라구요. 어떻게 해결할 수 있을까요? 2020 06.01 감사합니다. 2018 08.12 감사합니다. 2018 08.12 감사합니다. 2018 08.12 해결완료 2017 04.05