* Removed ladmin (remote administration tool), all related support code and the checkversion.pl tool with it's support code, which was shared with ladmin (topic:262934, related bugreport:1147, bugreport:1889, r9408 and r9610).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14667 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
ai4rei 2011-01-13 11:42:12 +00:00
parent 43ce11026b
commit 3e4934d780
36 changed files with 12 additions and 5147 deletions

View File

@ -1,6 +1,7 @@
Date Added
2011/01/13
* Removed ladmin (remote administration tool), all related support code and the checkversion.pl tool with it's support code, which was shared with ladmin (topic:262934, related bugreport:1147, bugreport:1889, r9408 and r9610). [Ai4rei]
* Fixed chrif-packet processing considering free/unused packet IDs incorrectly as variable length packets (-1 = variable length, 0 = disabled packet). [Ai4rei]
* Added support for creating account through the console-plugin on login-server (replaces ladmin functionality unavailable through atcommands). [Ai4rei]
* Reformatting and minor cleanups to console-plugin related code. [Ai4rei]

View File

@ -2,7 +2,7 @@
HAVE_MYSQL=@HAVE_MYSQL@
ifeq ($(HAVE_MYSQL),yes)
ALL_DEPENDS=common common_sql login login_sql char char_sql map map_sql ladmin tools converters plugins import save
ALL_DEPENDS=common common_sql login login_sql char char_sql map map_sql tools converters plugins import save
SQL_DEPENDS=common_sql login_sql char_sql map_sql import save
COMMON_SQL_DEPENDS=
LOGIN_SQL_DEPENDS=common_sql
@ -10,7 +10,7 @@ ifeq ($(HAVE_MYSQL),yes)
MAP_SQL_DEPENDS=common_sql
CONVERTERS_DEPENDS=common_sql
else
ALL_DEPENDS=common login char map ladmin tools plugins import save
ALL_DEPENDS=common login char map tools plugins import save
SQL_DEPENDS=needs_mysql
COMMON_SQL_DEPENDS=needs_mysql
LOGIN_SQL_DEPENDS=needs_mysql
@ -25,7 +25,7 @@ endif
login login_sql \
char char_sql \
map map_sql \
ladmin tools converters plugins addons import save \
tools converters plugins addons import save \
clean help
all: $(ALL_DEPENDS)
@ -60,9 +60,6 @@ map: common
map_sql: $(MAP_SQL_DEPENDS)
@$(MAKE) -C src/map sql
ladmin: common
@$(MAKE) -C src/ladmin
tools:
@$(MAKE) -C src/tool
@ -96,7 +93,6 @@ clean:
@$(MAKE) -C src/char $@
@$(MAKE) -C src/char_sql $@
@$(MAKE) -C src/map $@
@$(MAKE) -C src/ladmin $@
@$(MAKE) -C src/plugins $@
@$(MAKE) -C src/tool $@
@$(MAKE) -C src/txt-converter $@
@ -112,7 +108,6 @@ help:
@echo "'char_sql' - builds char server (SQL version)"
@echo "'map' - builds map server (TXT version)"
@echo "'map_sql' - builds map server (SQL version)"
@echo "'ladmin' - builds remote administration tool"
@echo "'tools' - builds all the tools in src/tools"
@echo "'converters' - builds the login/char converters"
@echo "'plugins' - builds all the plugins in src/plugins"
@ -148,7 +143,6 @@ install: conf/%.conf conf/%.txt
$(shell mv npc /opt/eathena/etc/eathena/npc)
$(shell mv log/* /opt/eathena/var/log/eathena/)
$(shell cp *-server* /opt/eathena/bin/)
$(shell cp ladmin /opt/eathena/bin/)
$(shell ln -s /opt/eathena/etc/eathena/save/ /opt/eathena/bin/)
$(shell ln -s /opt/eathena/etc/eathena/db/ /opt/eathena/bin/)
$(shell ln -s /opt/eathena/etc/eathena/conf/ /opt/eathena/bin/)
@ -159,7 +153,6 @@ bin-clean:
$(shell rm /opt/eathena/bin/login-server*)
$(shell rm /opt/eathena/bin/char-server*)
$(shell rm /opt/eathena/bin/map-server*)
$(shell rm /opt/eathena/bin/ladmin)
uninstall:
$(shell read -p "WARNING: This target does not work properly yet. Press Ctrl+C to cancel or Enter to continue.")

View File

@ -1,5 +1,7 @@
Date Added
2011/01/13
* Rev. 14667 Removed ladmin settings (ladmin_athena.conf) and login-server settings for ladmin (login_athena.conf) (topic:262934). [Ai4rei]
2010/12/30
* Rev. 14643 Updated mapcache up to 2010-12-01. Adds Bifrost, Dewata and Malangdo maps. [Ai4rei]
2010/12/12

View File

@ -1,31 +0,0 @@
// Athena Ladmin configuration file.
// Login Server IP
login_ip:127.0.0.1
// Login Server Port
login_port: 6900
// Administrative password, used to connect remotely to server.
// NOTICE: If you enable remote administration, you should change its value for security
admin_pass: admin
// Encoding type of the password
// 0: not encoded
// 1: key+password
// 2: password+key
passenc: 2
// Log Filename. All operations done by the software are logged in this file.
ladmin_log_filename: log/ladmin.log
// Indicate how to display date in logs, to players, etc.
// 0: 31-12-2004 23:59:59
// 1: 12-31-2004 23:59:59
// 2: 2004-31-12 23:59:59
// 3: 2004-12-31 23:59:59 (default)
date_format: 3
//If redirected output contains escape sequences (color codes)
stdout_with_ansisequence: no
import: conf/import/ladmin_conf.txt

View File

@ -35,16 +35,6 @@ stdout_with_ansisequence: no
//Example: "console_silent: 7" Hides information, status and notice messages (1+2+4)
console_silent: 0
// Whether remote administration is enabled or disabled
admin_state: no
// Administrative password, used by ladmin to connect remotely to server.
// NOTICE: you should change this value for security if you use ladmin.
admin_pass: admin
// Indicate the IP/host that the server accepts for remote administration.
admin_allowed_host: 127.0.0.1
// Console Commands
// Allow for console commands to be used on/off
// This prevents usage of >& log.file

3
configure vendored
View File

@ -1333,7 +1333,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_config_files="$ac_config_files Makefile src/common/Makefile"
ac_config_files="$ac_config_files src/char/Makefile src/login/Makefile src/ladmin/Makefile"
ac_config_files="$ac_config_files src/char/Makefile src/login/Makefile"
ac_config_files="$ac_config_files src/char_sql/Makefile src/txt-converter/Makefile"
@ -5628,7 +5628,6 @@ do
"src/common/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/common/Makefile" ;;
"src/char/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/char/Makefile" ;;
"src/login/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/login/Makefile" ;;
"src/ladmin/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/ladmin/Makefile" ;;
"src/char_sql/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/char_sql/Makefile" ;;
"src/txt-converter/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/txt-converter/Makefile" ;;
"src/map/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/map/Makefile" ;;

View File

@ -6,7 +6,7 @@ AC_REVISION($Revision$)
AC_PREREQ([2.59])
AC_CONFIG_SRCDIR([src/common/cbasetypes.h])
AC_CONFIG_FILES([Makefile src/common/Makefile])
AC_CONFIG_FILES([src/char/Makefile src/login/Makefile src/ladmin/Makefile])
AC_CONFIG_FILES([src/char/Makefile src/login/Makefile])
AC_CONFIG_FILES([src/char_sql/Makefile src/txt-converter/Makefile])
AC_CONFIG_FILES([src/map/Makefile src/plugins/Makefile src/tool/Makefile])

View File

@ -14,8 +14,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_sql", "vcproj-10
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapcache", "vcproj-10\mapcache.vcxproj", "{D356871D-58E1-450B-967A-E7E9646175AF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ladmin", "vcproj-10\ladmin.vcxproj", "{D356871D-58E1-450B-967A-E8E9646175AF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "txt-converter-login", "vcproj-10\txt-converter-login.vcxproj", "{D356871D-58E1-450B-967A-E9E9646175AF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "txt-converter-char", "vcproj-10\txt-converter-char.vcxproj", "{D356871D-58E1-450B-967A-EAE9646175AF}"
@ -102,16 +100,6 @@ Global
{D356871D-58E1-450B-967A-E7E9646175AF}.Release-sql|Win32.Build.0 = Release|Win32
{D356871D-58E1-450B-967A-E7E9646175AF}.Release-txt|Win32.ActiveCfg = Release|Win32
{D356871D-58E1-450B-967A-E7E9646175AF}.Release-txt|Win32.Build.0 = Release|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Debug-sql|Win32.ActiveCfg = Debug|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Debug-txt|Win32.ActiveCfg = Debug|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Debug-txt|Win32.Build.0 = Debug|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Release|Win32.Build.0 = Release|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Release-sql|Win32.ActiveCfg = Release|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Release-txt|Win32.ActiveCfg = Release|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Release-txt|Win32.Build.0 = Release|Win32
{D356871D-58E1-450B-967A-E9E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
{D356871D-58E1-450B-967A-E9E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
{D356871D-58E1-450B-967A-E9E9646175AF}.Debug-sql|Win32.ActiveCfg = Debug|Win32

View File

@ -14,8 +14,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_sql", "vcproj-8\
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapcache", "vcproj-8\mapcache.vcproj", "{D356871D-58E1-450B-967A-E7E9646175AF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ladmin", "vcproj-8\ladmin.vcproj", "{D356871D-58E1-450B-967A-E8E9646175AF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "txt-converter-login", "vcproj-8\txt-converter-login.vcproj", "{D356871D-58E1-450B-967A-E9E9646175AF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "txt-converter-char", "vcproj-8\txt-converter-char.vcproj", "{D356871D-58E1-450B-967A-EAE9646175AF}"
@ -108,16 +106,6 @@ Global
{D356871D-58E1-450B-967A-E7E9646175AF}.Release-sql|Win32.Build.0 = Release|Win32
{D356871D-58E1-450B-967A-E7E9646175AF}.Release-txt|Win32.ActiveCfg = Release|Win32
{D356871D-58E1-450B-967A-E7E9646175AF}.Release-txt|Win32.Build.0 = Release|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Debug-sql|Win32.ActiveCfg = Debug|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Debug-txt|Win32.ActiveCfg = Debug|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Debug-txt|Win32.Build.0 = Debug|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Release|Win32.Build.0 = Release|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Release-sql|Win32.ActiveCfg = Release|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Release-txt|Win32.ActiveCfg = Release|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Release-txt|Win32.Build.0 = Release|Win32
{D356871D-58E1-450B-967A-E9E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
{D356871D-58E1-450B-967A-E9E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
{D356871D-58E1-450B-967A-E9E9646175AF}.Debug-sql|Win32.ActiveCfg = Debug|Win32

View File

@ -14,8 +14,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_sql", "vcproj-9\
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapcache", "vcproj-9\mapcache.vcproj", "{D356871D-58E1-450B-967A-E7E9646175AF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ladmin", "vcproj-9\ladmin.vcproj", "{D356871D-58E1-450B-967A-E8E9646175AF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "txt-converter-login", "vcproj-9\txt-converter-login.vcproj", "{D356871D-58E1-450B-967A-E9E9646175AF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "txt-converter-char", "vcproj-9\txt-converter-char.vcproj", "{D356871D-58E1-450B-967A-EAE9646175AF}"
@ -108,16 +106,6 @@ Global
{D356871D-58E1-450B-967A-E7E9646175AF}.Release-sql|Win32.Build.0 = Release|Win32
{D356871D-58E1-450B-967A-E7E9646175AF}.Release-txt|Win32.ActiveCfg = Release|Win32
{D356871D-58E1-450B-967A-E7E9646175AF}.Release-txt|Win32.Build.0 = Release|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Debug-sql|Win32.ActiveCfg = Debug|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Debug-txt|Win32.ActiveCfg = Debug|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Debug-txt|Win32.Build.0 = Debug|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Release|Win32.Build.0 = Release|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Release-sql|Win32.ActiveCfg = Release|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Release-txt|Win32.ActiveCfg = Release|Win32
{D356871D-58E1-450B-967A-E8E9646175AF}.Release-txt|Win32.Build.0 = Release|Win32
{D356871D-58E1-450B-967A-E9E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
{D356871D-58E1-450B-967A-E9E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
{D356871D-58E1-450B-967A-E9E9646175AF}.Debug-sql|Win32.ActiveCfg = Debug|Win32

View File

@ -109,7 +109,6 @@ so we will focus mainly on stability for the time being, not new features.
<li>2-2 Jobs (Alternate 2nd Jobs)</li>
<li>Super Novice (Alternate 1st Job)</li>
<li>WoE (War of Emperium)</li>
<li>Remote administration of accounts (ladmin)</li>
<li>Weddings</li>
<li>Pet equipped mobs</li>
<li>Management of day/night</li>

View File

@ -2176,72 +2176,6 @@ int parse_fromlogin(int fd)
}
break;
case 0x2726: // Request to send a broadcast message (no answer)
if (RFIFOREST(fd) < 8 || RFIFOREST(fd) < (8 + RFIFOL(fd,4)))
return 0;
if (RFIFOL(fd,4) < 1)
char_log("Receiving a message for broadcast, but message is void.\n");
else
{
// at least 1 map-server
ARR_FIND( 0, MAX_MAP_SERVERS, i, server[i].fd >= 0 );
if (i == MAX_MAP_SERVERS)
char_log("'ladmin': Receiving a message for broadcast, but no map-server is online.\n");
else {
unsigned char buf[128];
char message[4096]; // +1 to add a null terminated if not exist in the packet
int lp;
char *p;
memset(message, '\0', sizeof(message));
memcpy(message, RFIFOP(fd,8), RFIFOL(fd,4));
message[sizeof(message)-1] = '\0';
remove_control_chars(message);
// remove all first spaces
p = message;
while(p[0] == ' ')
p++;
// if message is only composed of spaces
if (p[0] == '\0')
char_log("Receiving a message for broadcast, but message is only a lot of spaces.\n");
// else send message to all map-servers
else {
if (RFIFOW(fd,2) == 0) {
char_log("'ladmin': Receiving a message for broadcast (message (in yellow): %s)\n",
message);
lp = 4;
} else {
char_log("'ladmin': Receiving a message for broadcast (message (in blue): %s)\n",
message);
lp = 8;
}
// split message to max 80 char
while(p[0] != '\0') { // if not finish
if (p[0] == ' ') // jump if first char is a space
p++;
else {
char split[80];
char* last_space;
sscanf(p, "%79[^\t]", split); // max 79 char, any char (\t is control char and control char was removed before)
split[sizeof(split)-1] = '\0'; // last char always \0
if ((last_space = strrchr(split, ' ')) != NULL) { // searching space from end of the string
last_space[0] = '\0'; // replace it by NULL to have correct length of split
p++; // to jump the new NULL
}
p += strlen(split);
// send broadcast to all map-servers
WBUFW(buf,0) = 0x3800;
WBUFW(buf,2) = lp + strlen(split) + 1;
WBUFL(buf,4) = 0x65756c62; // only write if in blue (lp = 8)
memcpy(WBUFP(buf,lp), split, strlen(split) + 1);
mapif_sendall(buf, WBUFW(buf,2));
}
}
}
}
}
RFIFOSKIP(fd,8 + RFIFOL(fd,4));
break;
// reply to an account_reg2 registry request
case 0x2729:
if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
@ -2256,54 +2190,6 @@ int parse_fromlogin(int fd)
}
break;
// Account deletion notification (from login-server)
case 0x2730:
if (RFIFOREST(fd) < 6)
return 0;
// Deletion of all characters of the account
for(i = 0; i < char_num; i++) {
if (char_dat[i].status.account_id == RFIFOL(fd,2)) {
char_delete(&char_dat[i].status);
if (i < char_num - 1) {
memcpy(&char_dat[i], &char_dat[char_num-1], sizeof(struct character_data));
// if moved character owns to deleted account, check again it's character
if (char_dat[i].status.account_id == RFIFOL(fd,2)) {
i--;
// Correct moved character reference in the character's owner by [Yor]
} else {
int j, k;
struct char_session_data *sd2;
for (j = 0; j < fd_max; j++) {
if (session[j] && (sd2 = (struct char_session_data*)session[j]->session_data) &&
sd2->account_id == char_dat[char_num-1].status.account_id) {
for (k = 0; k < MAX_CHARS; k++) {
if (sd2->found_char[k] == char_num-1) {
sd2->found_char[k] = i;
break;
}
}
break;
}
}
}
}
char_num--;
}
}
// Deletion of the storage
inter_storage_delete(RFIFOL(fd,2));
// send to all map-servers to disconnect the player
{
unsigned char buf[6];
WBUFW(buf,0) = 0x2b13;
WBUFL(buf,2) = RFIFOL(fd,2);
mapif_sendall(buf, 6);
}
// disconnect player if online on char-server
disconnect_player(RFIFOL(fd,2));
RFIFOSKIP(fd,6);
break;
// State change of account/ban notification (from login-server)
case 0x2731:
if (RFIFOREST(fd) < 11)
@ -3750,22 +3636,6 @@ int parse_char(int fd)
}
return 0; // avoid processing of followup packets here
// Athena info get
case 0x7530:
WFIFOHEAD(fd,10);
WFIFOW(fd,0) = 0x7531;
WFIFOB(fd,2) = ATHENA_MAJOR_VERSION;
WFIFOB(fd,3) = ATHENA_MINOR_VERSION;
WFIFOB(fd,4) = ATHENA_REVISION;
WFIFOB(fd,5) = ATHENA_RELEASE_FLAG;
WFIFOB(fd,6) = ATHENA_OFFICIAL_FLAG;
WFIFOB(fd,7) = ATHENA_SERVER_INTER | ATHENA_SERVER_CHAR;
WFIFOW(fd,8) = ATHENA_MOD_VERSION;
WFIFOSET(fd,10);
RFIFOSKIP(fd,2);
break;
// unknown packet received
default:
ShowError("parse_char: Received unknown packet "CL_WHITE"0x%x"CL_RESET" from ip '"CL_WHITE"%s"CL_RESET"'! Disconnecting!\n", RFIFOW(fd,0), ip2str(ipl, NULL));

View File

@ -3429,22 +3429,6 @@ int parse_char(int fd)
}
return 0; // avoid processing of followup packets here
// Athena info get
case 0x7530:
WFIFOHEAD(fd,10);
WFIFOW(fd,0) = 0x7531;
WFIFOB(fd,2) = ATHENA_MAJOR_VERSION;
WFIFOB(fd,3) = ATHENA_MINOR_VERSION;
WFIFOB(fd,4) = ATHENA_REVISION;
WFIFOB(fd,5) = ATHENA_RELEASE_FLAG;
WFIFOB(fd,6) = ATHENA_OFFICIAL_FLAG;
WFIFOB(fd,7) = ATHENA_SERVER_INTER | ATHENA_SERVER_CHAR;
WFIFOW(fd,8) = ATHENA_MOD_VERSION;
WFIFOSET(fd,10);
RFIFOSKIP(fd,2);
break;
// unknown packet received
default:
ShowError("parse_char: Received unknown packet "CL_WHITE"0x%x"CL_RESET" from ip '"CL_WHITE"%s"CL_RESET"'! Disconnecting!\n", RFIFOW(fd,0), ip2str(ipl, NULL));

View File

@ -1,45 +0,0 @@
COMMON_OBJ = ../common/obj_all/minicore.o ../common/obj_all/minisocket.o ../common/obj_all/timer.o \
../common/obj_all/malloc.o ../common/obj_all/showmsg.o ../common/obj_all/strlib.o \
../common/obj_all/utils.o ../common/obj_all/md5calc.o
COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h \
../common/version.h ../common/malloc.h ../common/showmsg.h ../common/strlib.h \
../common/utils.h ../common/md5calc.h ../common/cbasetypes.h
LADMIN_OBJ = obj_all/ladmin.o
LADMIN_H = ladmin.h
@SET_MAKE@
#####################################################################
.PHONY : all ladmin clean help
all: ladmin
ladmin: obj_all $(LADMIN_OBJ) $(COMMON_OBJ)
@CC@ @LDFLAGS@ -o ../../ladmin@EXEEXT@ $(LADMIN_OBJ) $(COMMON_OBJ) @LIBS@
clean:
rm -rf *.o obj_all ../../ladmin@EXEEXT@
help:
@echo "possible targets are 'ladmin' 'all' 'clean' 'help'"
@echo "'ladmin' - remote administration tool"
@echo "'all' - builds all above targets"
@echo "'clean' - cleans builds and objects"
@echo "'help' - outputs this message"
#####################################################################
obj_all:
-mkdir obj_all
obj_all/%.o: %.c $(LADMIN_H) $(COMMON_H)
@CC@ @CFLAGS@ @LDFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
# missing common object files
../common/obj_all/%.o:
@$(MAKE) -C ../common txt
../common/obj_all/mini%.o:
@$(MAKE) -C ../common txt

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +0,0 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
#ifndef _LADMIN_H_
#define _LADMIN_H_
#define LADMIN_CONF_NAME "conf/ladmin_athena.conf"
#endif /* _LADMIN_H_ */

View File

@ -13,7 +13,7 @@ COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h
COMMON_SQL_OBJ = ../common/obj_sql/sql.o
COMMON_SQL_H = ../common/sql.h
LOGIN_OBJ = login.o admin.o
LOGIN_OBJ = login.o
LOGIN_TXT_OBJ = $(LOGIN_OBJ:%=obj_txt/%) \
obj_txt/account_txt.o obj_txt/ipban_txt.o obj_txt/loginlog_txt.o
LOGIN_SQL_OBJ = $(LOGIN_OBJ:%=obj_sql/%) \

View File

@ -1,857 +0,0 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
#include "../common/cbasetypes.h"
#include "../common/mmo.h"
#include "../common/core.h"
#include "../common/socket.h"
#include "../common/db.h"
#include "../common/timer.h"
#include "../common/malloc.h"
#include "../common/strlib.h"
#include "../common/showmsg.h"
#include "../common/version.h"
#include "../common/md5calc.h"
#include "../common/lock.h"
#include "account.h"
#include "login.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h> // for stat/lstat/fstat
extern AccountDB* accounts;
int charif_sendallwos(int sfd, unsigned char *buf, unsigned int len);
bool check_password(const char* md5key, int passwdenc, const char* passwd, const char* refpass);
int mmo_auth_new(const char* userid, const char* pass, const char sex, const char* last_ip);
int parse_admin(int fd);
bool ladmin_auth(struct login_session_data* sd, const char* ip)
{
bool result = false;
if( str2ip(ip) != host2ip(login_config.admin_allowed_host) )
ShowNotice("'ladmin'-login: Connection in administration mode REFUSED - IP isn't authorised (ip: %s).\n", ip);
else
if( !login_config.admin_state )
ShowNotice("'ladmin'-login: Connection in administration mode REFUSED - remote administration is disabled (ip: %s)\n", ip);
else
if( !check_password(sd->md5key, sd->passwdenc, sd->passwd, login_config.admin_pass) )
ShowNotice("'ladmin'-login: Connection in administration mode REFUSED - invalid password (ip: %s)\n", ip);
else
{
ShowNotice("'ladmin'-login: Connection in administration mode accepted (ip: %s)\n", ip);
session[sd->fd]->func_parse = parse_admin;
result = true;
}
return result;
}
//---------------------------------------
// Packet parsing for administation login
//
// List of supported operations:
// 0x7530 - request server version (response: 0x7531)
// 0x7938 - request server list (response: 0x7939)
// 0x7920 - request entire list of accounts (response: 0x7921)
// 0x794e - request message broadcast (response: 0x794f + 0x2726)
// 0x7930 - request account creation (response: 0x7931)
// 0x7932 - request account deletion (response: 0x7933 + 0x2730)
// 0x7934 - request account password modification (response: 0x7935)
// 0x7936 - request account state modification (response: 0x7937 + 0x2731)
// 0x793a - request password check (response: 0x793b)
// 0x793c - request account sex modification (response: 0x793d + 0x2723)
// 0x793e - request account gm-level modification (response: 0x793f)
// 0x7940 - request account email modification (response: 0x7941)
// 0x7942 - request account memo modification (response: 0x7943)
// 0x7948 - request account expiration-time modification - absolute (response: 0x7949)
// 0x7950 - request account expiration-time modification - relative (response: 0x7951)
// 0x794a - request account unban-time modification - absolute (response: 0x794b + 0x2731)
// 0x794c - request account unban-time modification - relative (response: 0x794d + 0x2731)
// 0x7944 - request account id lookup by name (response: 0x7945)
// 0x7946 - request account name lookup by id (response: 0x7947)
// 0x7952 - request account information lookup by name (response: 0x7953)
// 0x7954 - request account information lookup by id (response: 0x7953)
//---------------------------------------
int parse_admin(int fd)
{
char* account_name;
uint32 ipl = session[fd]->client_addr;
char ip[16];
ip2str(ipl, ip);
if( session[fd]->flag.eof )
{
do_close(fd);
ShowInfo("Remote administration has disconnected (session #%d).\n", fd);
return 0;
}
while( RFIFOREST(fd) >= 2 )
{
uint16 command = RFIFOW(fd,0);
switch( command )
{
case 0x7530: // Request of the server version
ShowStatus("'ladmin': Sending of the server version (ip: %s)\n", ip);
WFIFOHEAD(fd,10);
WFIFOW(fd,0) = 0x7531;
WFIFOB(fd,2) = ATHENA_MAJOR_VERSION;
WFIFOB(fd,3) = ATHENA_MINOR_VERSION;
WFIFOB(fd,4) = ATHENA_REVISION;
WFIFOB(fd,5) = ATHENA_RELEASE_FLAG;
WFIFOB(fd,6) = ATHENA_OFFICIAL_FLAG;
WFIFOB(fd,7) = ATHENA_SERVER_LOGIN;
WFIFOW(fd,8) = ATHENA_MOD_VERSION;
WFIFOSET(fd,10);
RFIFOSKIP(fd,2);
break;
/*
case 0x7920: // Request of an accounts list
if (RFIFOREST(fd) < 10)
return 0;
{
int st, ed;
uint16 len;
CREATE_BUFFER(id, int, auth_num);
st = RFIFOL(fd,2);
ed = RFIFOL(fd,6);
RFIFOSKIP(fd,10);
WFIFOW(fd,0) = 0x7921;
if (st < 0)
st = 0;
if (ed > END_ACCOUNT_NUM || ed < st || ed <= 0)
ed = END_ACCOUNT_NUM;
ShowStatus("'ladmin': Sending an accounts list (ask: from %d to %d, ip: %s)\n", st, ed, ip);
// Sort before send
for(i = 0; i < auth_num; i++) {
unsigned int k;
id[i] = i;
for(j = 0; j < i; j++) {
if (auth_dat[id[i]].account_id < auth_dat[id[j]].account_id) {
for(k = i; k > j; k--) {
id[k] = id[k-1];
}
id[j] = i; // id[i]
break;
}
}
}
// Sending accounts information
len = 4;
for(i = 0; i < auth_num && len < 30000; i++) {
int account_id = auth_dat[id[i]].account_id; // use sorted index
if (account_id >= st && account_id <= ed) {
j = id[i];
WFIFOL(fd,len) = account_id;
WFIFOB(fd,len+4) = (unsigned char)isGM(account_id);
memcpy(WFIFOP(fd,len+5), auth_dat[j].userid, 24);
WFIFOB(fd,len+29) = auth_dat[j].sex;
WFIFOL(fd,len+30) = auth_dat[j].logincount;
if (auth_dat[j].state == 0 && auth_dat[j].unban_time != 0) // if no state and banished
WFIFOL(fd,len+34) = 7; // 6 = Your are Prohibited to log in until %s
else
WFIFOL(fd,len+34) = auth_dat[j].state;
len += 38;
}
}
WFIFOW(fd,2) = len;
WFIFOSET(fd,len);
//if (id) free(id);
DELETE_BUFFER(id);
}
break;
*/
case 0x7930: // Request for an account creation
if (RFIFOREST(fd) < 91)
return 0;
{
struct mmo_account ma;
safestrncpy(ma.userid, (char*)RFIFOP(fd, 2), sizeof(ma.userid));
safestrncpy(ma.pass, (char*)RFIFOP(fd,26), sizeof(ma.pass));
ma.sex = RFIFOB(fd,50);
safestrncpy(ma.email, (char*)RFIFOP(fd,51), sizeof(ma.email));
safestrncpy(ma.lastlogin, "-", sizeof(ma.lastlogin));
ShowNotice("'ladmin': Account creation request (account: %s pass: %s, sex: %c, email: %s, ip: %s)\n", ma.userid, ma.pass, ma.sex, ma.email, ip);
WFIFOW(fd,0) = 0x7931;
WFIFOL(fd,2) = mmo_auth_new(ma.userid, ma.pass, ma.sex, ip);
safestrncpy((char*)WFIFOP(fd,6), ma.userid, 24);
WFIFOSET(fd,30);
}
RFIFOSKIP(fd,91);
break;
/*
case 0x7932: // Request for an account deletion
if (RFIFOREST(fd) < 26)
return 0;
{
struct mmo_account acc;
char* account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
WFIFOW(fd,0) = 0x7933;
if( accounts->load_str(accounts, &acc, account_name) )
{
// Char-server is notified of deletion (for characters deletion).
unsigned char buf[65535];
WBUFW(buf,0) = 0x2730;
WBUFL(buf,2) = acc.account_id;
charif_sendallwos(-1, buf, 6);
// send answer
memcpy(WFIFOP(fd,6), acc.userid, 24);
WFIFOL(fd,2) = acc.account_id;
// delete account
memset(acc.userid, '\0', sizeof(acc.userid));
auth_dat[i].account_id = -1;
mmo_auth_sync();
} else {
WFIFOL(fd,2) = -1;
memcpy(WFIFOP(fd,6), account_name, 24);
ShowNotice("'ladmin': Attempt to delete an unknown account (account: %s, ip: %s)\n", account_name, ip);
}
WFIFOSET(fd,30);
}
RFIFOSKIP(fd,26);
break;
*/
case 0x7934: // Request to change a password
if (RFIFOREST(fd) < 50)
return 0;
{
struct mmo_account acc;
char* account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
WFIFOW(fd,0) = 0x7935;
if( accounts->load_str(accounts, &acc, account_name) )
{
WFIFOL(fd,2) = acc.account_id;
safestrncpy((char*)WFIFOP(fd,6), acc.userid, 24);
safestrncpy(acc.pass, (char*)RFIFOP(fd,26), 24);
ShowNotice("'ladmin': Modification of a password (account: %s, new password: %s, ip: %s)\n", acc.userid, acc.pass, ip);
accounts->save(accounts, &acc);
}
else
{
WFIFOL(fd,2) = -1;
safestrncpy((char*)WFIFOP(fd,6), account_name, 24);
ShowNotice("'ladmin': Attempt to modify the password of an unknown account (account: %s, ip: %s)\n", account_name, ip);
}
WFIFOSET(fd,30);
}
RFIFOSKIP(fd,50);
break;
case 0x7936: // Request to modify a state
if (RFIFOREST(fd) < 50)
return 0;
{
struct mmo_account acc;
char* account_name = (char*)RFIFOP(fd,2);
uint32 state = RFIFOL(fd,26);
account_name[23] = '\0';
WFIFOW(fd,0) = 0x7937;
if( accounts->load_str(accounts, &acc, account_name) )
{
memcpy(WFIFOP(fd,6), acc.userid, 24);
WFIFOL(fd,2) = acc.account_id;
if (acc.state == state)
ShowNotice("'ladmin': Modification of a state, but the state of the account already has this value (account: %s, received state: %d, ip: %s)\n", account_name, state, ip);
else
{
ShowNotice("'ladmin': Modification of a state (account: %s, new state: %d, ip: %s)\n", acc.userid, state, ip);
if (acc.state == 0) {
unsigned char buf[16];
WBUFW(buf,0) = 0x2731;
WBUFL(buf,2) = acc.account_id;
WBUFB(buf,6) = 0; // 0: change of statut, 1: ban
WBUFL(buf,7) = state; // status or final date of a banishment
charif_sendallwos(-1, buf, 11);
}
acc.state = state;
accounts->save(accounts, &acc);
}
}
else
{
ShowNotice("'ladmin': Attempt to modify the state of an unknown account (account: %s, received state: %d, ip: %s)\n", account_name, state, ip);
WFIFOL(fd,2) = -1;
memcpy(WFIFOP(fd,6), account_name, 24);
}
WFIFOL(fd,30) = state;
WFIFOSET(fd,34);
}
RFIFOSKIP(fd,50);
break;
/*
case 0x7938: // Request for servers list and # of online players
{
uint8 server_num = 0;
ShowStatus("'ladmin': Sending of servers list (ip: %s)\n", ip);
for(i = 0; i < MAX_SERVERS; i++) {
if (server[i].fd >= 0) {
WFIFOL(fd,4+server_num*32) = htonl(server[i].ip);
WFIFOW(fd,4+server_num*32+4) = htons(server[i].port);
memcpy(WFIFOP(fd,4+server_num*32+6), server[i].name, 20);
WFIFOW(fd,4+server_num*32+26) = server[i].users;
WFIFOW(fd,4+server_num*32+28) = server[i].maintenance;
WFIFOW(fd,4+server_num*32+30) = server[i].new_;
server_num++;
}
}
WFIFOW(fd,0) = 0x7939;
WFIFOW(fd,2) = 4 + 32 * server_num;
WFIFOSET(fd,4+32*server_num);
RFIFOSKIP(fd,2);
break;
}
case 0x793a: // Request to password check
if (RFIFOREST(fd) < 50)
return 0;
WFIFOW(fd,0) = 0x793b;
WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
remove_control_chars(account_name);
if( accounts->load_str(accounts, &acc, account_name) )
{
char pass[25];
memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
memcpy(pass, RFIFOP(fd,26), 24);
pass[24] = '\0';
remove_control_chars(pass);
if (strcmp(acc.pass, pass) == 0) {
WFIFOL(fd,2) = acc.account_id;
ShowNotice("'ladmin': Check of password OK (account: %s, password: %s, ip: %s)\n", acc.userid, acc.pass, ip);
} else {
ShowNotice("'ladmin': Failure of password check (account: %s, proposed pass: %s, ip: %s)\n", acc.userid, pass, ip);
}
} else {
memcpy(WFIFOP(fd,6), account_name, 24);
ShowNotice("'ladmin': Attempt to check the password of an unknown account (account: %s, ip: %s)\n", account_name, ip);
}
WFIFOSET(fd,30);
RFIFOSKIP(fd,50);
break;
case 0x793c: // Request to modify sex
if (RFIFOREST(fd) < 27)
return 0;
WFIFOW(fd,0) = 0x793d;
WFIFOL(fd,2) = 0xFFFFFFFF; // -1
account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
remove_control_chars(account_name);
memcpy(WFIFOP(fd,6), account_name, 24);
{
char sex;
sex = RFIFOB(fd,26);
if (sex != 'F' && sex != 'M') {
if (sex > 31)
ShowNotice("'ladmin': Attempt to give an invalid sex (account: %s, received sex: %c, ip: %s)\n", account_name, sex, ip);
else
ShowNotice("'ladmin': Attempt to give an invalid sex (account: %s, received sex: 'control char', ip: %s)\n", account_name, ip);
} else {
if( accounts->load_str(accounts, &acc, account_name) )
{
memcpy(WFIFOP(fd,6), acc.userid, 24);
if (acc.sex != sex)
{
unsigned char buf[16];
ShowNotice("'ladmin': Modification of a sex (account: %s, new sex: %c, ip: %s)\n", acc.userid, sex, ip);
WFIFOL(fd,2) = acc.account_id;
acc.sex = sex;
accounts->save(accounts, &acc);
// send to all char-server the change
WBUFW(buf,0) = 0x2723;
WBUFL(buf,2) = acc.account_id;
WBUFB(buf,6) = acc.sex;
charif_sendallwos(-1, buf, 7);
} else {
ShowNotice("'ladmin': Modification of a sex, but the sex is already the good sex (account: %s, sex: %c, ip: %s)\n", acc.userid, sex, ip);
}
} else {
ShowNotice("'ladmin': Attempt to modify the sex of an unknown account (account: %s, received sex: %c, ip: %s)\n", account_name, sex, ip);
}
}
}
WFIFOSET(fd,30);
RFIFOSKIP(fd,27);
break;
case 0x793e: // Request to modify GM level
if (RFIFOREST(fd) < 27)
return 0;
WFIFOW(fd,0) = 0x793f;
WFIFOL(fd,2) = 0xFFFFFFFF; // -1
account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
remove_control_chars(account_name);
memcpy(WFIFOP(fd,6), account_name, 24);
{
char new_gm_level;
new_gm_level = RFIFOB(fd,26);
if( new_gm_level < 0 || new_gm_level > 99 )
ShowNotice("'ladmin': Attempt to give an invalid GM level (account: %s, received GM level: %d, ip: %s)\n", account_name, (int)new_gm_level, ip);
else
if( !accounts->load_str(accounts, &acc, account_name) )
ShowNotice("'ladmin': Attempt to modify the GM level of an unknown account (account: %s, received GM level: %d, ip: %s)\n", account_name, (int)new_gm_level, ip);
else
{
memcpy(WFIFOP(fd,6), acc.userid, 24);
if (isGM(acc.account_id) == new_gm_level)
ShowNotice("'ladmin': Attempt to modify of a GM level, but the GM level is already the good GM level (account: %s (%d), GM level: %d, ip: %s)\n", acc.userid, acc.account_id, (int)new_gm_level, ip);
else
{
//TODO: change level
}
}
}
WFIFOSET(fd,30);
RFIFOSKIP(fd,27);
break;
case 0x7940: // Request to modify e-mail
if (RFIFOREST(fd) < 66)
return 0;
WFIFOW(fd,0) = 0x7941;
WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
remove_control_chars(account_name);
memcpy(WFIFOP(fd,6), account_name, 24);
{
char email[40];
memcpy(email, RFIFOP(fd,26), 40);
if (e_mail_check(email) == 0) {
ShowNotice("'ladmin': Attempt to give an invalid e-mail (account: %s, ip: %s)\n", account_name, ip);
} else {
remove_control_chars(email);
i = search_account_index(account_name);
if (i != -1) {
memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
memcpy(auth_dat[i].email, email, 40);
WFIFOL(fd,2) = auth_dat[i].account_id;
ShowNotice("'ladmin': Modification of an email (account: %s, new e-mail: %s, ip: %s)\n", auth_dat[i].userid, email, ip);
mmo_auth_sync();
} else {
ShowNotice("'ladmin': Attempt to modify the e-mail of an unknown account (account: %s, received e-mail: %s, ip: %s)\n", account_name, email, ip);
}
}
}
WFIFOSET(fd,30);
RFIFOSKIP(fd,66);
break;
case 0x7942: // Request to modify memo field
if ((int)RFIFOREST(fd) < 28 || (int)RFIFOREST(fd) < (28 + RFIFOW(fd,26)))
return 0;
WFIFOW(fd,0) = 0x7943;
WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
remove_control_chars(account_name);
i = search_account_index(account_name);
if (i != -1) {
int size_of_memo = sizeof(auth_dat[i].memo);
memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
memset(auth_dat[i].memo, '\0', size_of_memo);
if (RFIFOW(fd,26) == 0) {
strncpy(auth_dat[i].memo, "-", size_of_memo);
} else if (RFIFOW(fd,26) > size_of_memo - 1) {
memcpy(auth_dat[i].memo, RFIFOP(fd,28), size_of_memo - 1);
} else {
memcpy(auth_dat[i].memo, RFIFOP(fd,28), RFIFOW(fd,26));
}
auth_dat[i].memo[size_of_memo - 1] = '\0';
remove_control_chars(auth_dat[i].memo);
WFIFOL(fd,2) = auth_dat[i].account_id;
ShowNotice("'ladmin': Modification of a memo field (account: %s, new memo: %s, ip: %s)\n", auth_dat[i].userid, auth_dat[i].memo, ip);
mmo_auth_sync();
} else {
memcpy(WFIFOP(fd,6), account_name, 24);
ShowNotice("'ladmin': Attempt to modify the memo field of an unknown account (account: %s, ip: %s)\n", account_name, ip);
}
WFIFOSET(fd,30);
RFIFOSKIP(fd,28 + RFIFOW(fd,26));
break;
case 0x7944: // Request to found an account id
if (RFIFOREST(fd) < 26)
return 0;
WFIFOW(fd,0) = 0x7945;
WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
remove_control_chars(account_name);
i = search_account_index(account_name);
if (i != -1) {
memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
WFIFOL(fd,2) = auth_dat[i].account_id;
ShowNotice("'ladmin': Request (by the name) of an account id (account: %s, id: %d, ip: %s)\n", auth_dat[i].userid, auth_dat[i].account_id, ip);
} else {
memcpy(WFIFOP(fd,6), account_name, 24);
ShowNotice("'ladmin': ID request (by the name) of an unknown account (account: %s, ip: %s)\n", account_name, ip);
}
WFIFOSET(fd,30);
RFIFOSKIP(fd,26);
break;
case 0x7946: // Request to found an account name
if (RFIFOREST(fd) < 6)
return 0;
WFIFOW(fd,0) = 0x7947;
WFIFOL(fd,2) = RFIFOL(fd,2);
memset(WFIFOP(fd,6), '\0', 24);
for(i = 0; i < auth_num; i++) {
if (auth_dat[i].account_id == (int)RFIFOL(fd,2)) {
strncpy((char*)WFIFOP(fd,6), auth_dat[i].userid, 24);
ShowNotice("'ladmin': Request (by id) of an account name (account: %s, id: %d, ip: %s)\n", auth_dat[i].userid, RFIFOL(fd,2), ip);
break;
}
}
if (i == auth_num) {
ShowNotice("'ladmin': Name request (by id) of an unknown account (id: %d, ip: %s)\n", RFIFOL(fd,2), ip);
strncpy((char*)WFIFOP(fd,6), "", 24);
}
WFIFOSET(fd,30);
RFIFOSKIP(fd,6);
break;
case 0x7948: // Request to change the validity limit (timestamp) (absolute value)
if (RFIFOREST(fd) < 30)
return 0;
{
time_t timestamp;
char tmpstr[2048];
WFIFOW(fd,0) = 0x7949;
WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
remove_control_chars(account_name);
timestamp = (time_t)RFIFOL(fd,26);
strftime(tmpstr, 24, login_config.date_format, localtime(&timestamp));
i = search_account_index(account_name);
if (i != -1) {
memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
ShowNotice("'ladmin': Change of a validity limit (account: %s, new validity: %d (%s), ip: %s)\n", auth_dat[i].userid, timestamp, (timestamp == 0 ? "unlimited" : tmpstr), ip);
auth_dat[i].expiration_time = timestamp;
WFIFOL(fd,2) = auth_dat[i].account_id;
mmo_auth_sync();
} else {
memcpy(WFIFOP(fd,6), account_name, 24);
ShowNotice("'ladmin': Attempt to change the validity limit of an unknown account (account: %s, received validity: %d (%s), ip: %s)\n", account_name, timestamp, (timestamp == 0 ? "unlimited" : tmpstr), ip);
}
WFIFOL(fd,30) = (unsigned int)timestamp;
}
WFIFOSET(fd,34);
RFIFOSKIP(fd,30);
break;
case 0x794a: // Request to change the final date of a banishment (timestamp) (absolute value)
if (RFIFOREST(fd) < 30)
return 0;
{
time_t timestamp;
char tmpstr[2048];
WFIFOW(fd,0) = 0x794b;
WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
remove_control_chars(account_name);
timestamp = (time_t)RFIFOL(fd,26);
if (timestamp <= time(NULL))
timestamp = 0;
strftime(tmpstr, 24, login_config.date_format, localtime(&timestamp));
i = search_account_index(account_name);
if (i != -1) {
memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
WFIFOL(fd,2) = auth_dat[i].account_id;
ShowNotice("'ladmin': Change of the final date of a banishment (account: %s, new final date of banishment: %d (%s), ip: %s)\n", auth_dat[i].userid, timestamp, (timestamp == 0 ? "no banishment" : tmpstr), ip);
if (auth_dat[i].unban_time != timestamp) {
if (timestamp != 0) {
unsigned char buf[16];
WBUFW(buf,0) = 0x2731;
WBUFL(buf,2) = auth_dat[i].account_id;
WBUFB(buf,6) = 1; // 0: change of statut, 1: ban
WBUFL(buf,7) = (unsigned int)timestamp; // status or final date of a banishment
charif_sendallwos(-1, buf, 11);
}
auth_dat[i].unban_time = timestamp;
mmo_auth_sync();
}
} else {
memcpy(WFIFOP(fd,6), account_name, 24);
ShowNotice("'ladmin': Attempt to change the final date of a banishment of an unknown account (account: %s, received final date of banishment: %d (%s), ip: %s)\n", account_name, timestamp, (timestamp == 0 ? "no banishment" : tmpstr), ip);
}
WFIFOL(fd,30) = (unsigned int)timestamp;
}
WFIFOSET(fd,34);
RFIFOSKIP(fd,30);
break;
case 0x794c: // Request to change the final date of a banishment (timestamp) (relative change)
if (RFIFOREST(fd) < 38)
return 0;
{
time_t timestamp;
struct tm *tmtime;
char tmpstr[2048];
WFIFOW(fd,0) = 0x794d;
WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
remove_control_chars(account_name);
i = search_account_index(account_name);
if (i != -1) {
WFIFOL(fd,2) = auth_dat[i].account_id;
memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
if (auth_dat[i].unban_time == 0 || auth_dat[i].unban_time < time(NULL))
timestamp = time(NULL);
else
timestamp = auth_dat[i].unban_time;
tmtime = localtime(&timestamp);
tmtime->tm_year = tmtime->tm_year + (short)RFIFOW(fd,26);
tmtime->tm_mon = tmtime->tm_mon + (short)RFIFOW(fd,28);
tmtime->tm_mday = tmtime->tm_mday + (short)RFIFOW(fd,30);
tmtime->tm_hour = tmtime->tm_hour + (short)RFIFOW(fd,32);
tmtime->tm_min = tmtime->tm_min + (short)RFIFOW(fd,34);
tmtime->tm_sec = tmtime->tm_sec + (short)RFIFOW(fd,36);
timestamp = mktime(tmtime);
if (timestamp != -1) {
if (timestamp <= time(NULL))
timestamp = 0;
strftime(tmpstr, 24, login_config.date_format, localtime(&timestamp));
ShowNotice("'ladmin': Adjustment of a final date of a banishment (account: %s, (%+d y %+d m %+d d %+d h %+d mn %+d s) -> new validity: %d (%s), ip: %s)\n", auth_dat[i].userid, (short)RFIFOW(fd,26), (short)RFIFOW(fd,28), (short)RFIFOW(fd,30), (short)RFIFOW(fd,32), (short)RFIFOW(fd,34), (short)RFIFOW(fd,36), timestamp, (timestamp == 0 ? "no banishment" : tmpstr), ip);
if (auth_dat[i].unban_time != timestamp) {
if (timestamp != 0) {
unsigned char buf[16];
WBUFW(buf,0) = 0x2731;
WBUFL(buf,2) = auth_dat[i].account_id;
WBUFB(buf,6) = 1; // 0: change of statut, 1: ban
WBUFL(buf,7) = (unsigned int)timestamp; // status or final date of a banishment
charif_sendallwos(-1, buf, 11);
}
auth_dat[i].unban_time = timestamp;
mmo_auth_sync();
}
} else {
strftime(tmpstr, 24, login_config.date_format, localtime(&auth_dat[i].unban_time));
ShowNotice("'ladmin': Impossible to adjust the final date of a banishment (account: %s, %d (%s) + (%+d y %+d m %+d d %+d h %+d mn %+d s) -> ???, ip: %s)\n", auth_dat[i].userid, auth_dat[i].unban_time, (auth_dat[i].unban_time == 0 ? "no banishment" : tmpstr), (short)RFIFOW(fd,26), (short)RFIFOW(fd,28), (short)RFIFOW(fd,30), (short)RFIFOW(fd,32), (short)RFIFOW(fd,34), (short)RFIFOW(fd,36), ip);
}
WFIFOL(fd,30) = (unsigned long)auth_dat[i].unban_time;
} else {
memcpy(WFIFOP(fd,6), account_name, 24);
ShowNotice("'ladmin': Attempt to adjust the final date of a banishment of an unknown account (account: %s, ip: %s)\n", account_name, ip);
WFIFOL(fd,30) = 0;
}
}
WFIFOSET(fd,34);
RFIFOSKIP(fd,38);
break;
case 0x794e: // Request to send a broadcast message
if (RFIFOREST(fd) < 8 || RFIFOREST(fd) < (8 + RFIFOL(fd,4)))
return 0;
WFIFOW(fd,0) = 0x794f;
WFIFOW(fd,2) = 0xFFFF; // WTF???
if (RFIFOL(fd,4) < 1) {
ShowNotice("'ladmin': Receiving a message for broadcast, but message is void (ip: %s)\n", ip);
} else {
// at least 1 char-server
for(i = 0; i < MAX_SERVERS; i++)
if (server[i].fd >= 0)
break;
if (i == MAX_SERVERS) {
ShowNotice("'ladmin': Receiving a message for broadcast, but no char-server is online (ip: %s)\n", ip);
} else {
unsigned char buf[32000];
char message[32000];
WFIFOW(fd,2) = 0;
memset(message, '\0', sizeof(message));
memcpy(message, RFIFOP(fd,8), RFIFOL(fd,4));
message[sizeof(message)-1] = '\0';
remove_control_chars(message);
if (RFIFOW(fd,2) == 0)
ShowNotice("'ladmin': Receiving a message for broadcast (message (in yellow): %s, ip: %s)\n", message, ip);
else
ShowNotice("'ladmin': Receiving a message for broadcast (message (in blue): %s, ip: %s)\n", message, ip);
// send same message to all char-servers (no answer)
memcpy(WBUFP(buf,0), RFIFOP(fd,0), 8 + RFIFOL(fd,4));
WBUFW(buf,0) = 0x2726;
charif_sendallwos(-1, buf, 8 + RFIFOL(fd,4));
}
}
WFIFOSET(fd,4);
RFIFOSKIP(fd,8 + RFIFOL(fd,4));
break;
case 0x7950: // Request to change the validity limite (timestamp) (relative change)
if (RFIFOREST(fd) < 38)
return 0;
{
time_t timestamp;
struct tm *tmtime;
char tmpstr[2048];
char tmpstr2[2048];
WFIFOW(fd,0) = 0x7951;
WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
remove_control_chars(account_name);
i = search_account_index(account_name);
if (i != -1) {
WFIFOL(fd,2) = auth_dat[i].account_id;
memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
timestamp = auth_dat[i].expiration_time;
if (timestamp == 0 || timestamp < time(NULL))
timestamp = time(NULL);
tmtime = localtime(&timestamp);
tmtime->tm_year = tmtime->tm_year + (short)RFIFOW(fd,26);
tmtime->tm_mon = tmtime->tm_mon + (short)RFIFOW(fd,28);
tmtime->tm_mday = tmtime->tm_mday + (short)RFIFOW(fd,30);
tmtime->tm_hour = tmtime->tm_hour + (short)RFIFOW(fd,32);
tmtime->tm_min = tmtime->tm_min + (short)RFIFOW(fd,34);
tmtime->tm_sec = tmtime->tm_sec + (short)RFIFOW(fd,36);
timestamp = mktime(tmtime);
if (timestamp != -1) {
strftime(tmpstr, 24, login_config.date_format, localtime(&auth_dat[i].expiration_time));
strftime(tmpstr2, 24, login_config.date_format, localtime(&timestamp));
ShowNotice("'ladmin': Adjustment of a validity limit (account: %s, %d (%s) + (%+d y %+d m %+d d %+d h %+d mn %+d s) -> new validity: %d (%s), ip: %s)\n", auth_dat[i].userid, auth_dat[i].expiration_time, (auth_dat[i].expiration_time == 0 ? "unlimited" : tmpstr), (short)RFIFOW(fd,26), (short)RFIFOW(fd,28), (short)RFIFOW(fd,30), (short)RFIFOW(fd,32), (short)RFIFOW(fd,34), (short)RFIFOW(fd,36), timestamp, (timestamp == 0 ? "unlimited" : tmpstr2), ip);
auth_dat[i].expiration_time = timestamp;
mmo_auth_sync();
WFIFOL(fd,30) = (unsigned long)auth_dat[i].expiration_time;
} else {
strftime(tmpstr, 24, login_config.date_format, localtime(&auth_dat[i].expiration_time));
ShowNotice("'ladmin': Impossible to adjust a validity limit (account: %s, %d (%s) + (%+d y %+d m %+d d %+d h %+d mn %+d s) -> ???, ip: %s)\n", auth_dat[i].userid, auth_dat[i].expiration_time, (auth_dat[i].expiration_time == 0 ? "unlimited" : tmpstr), (short)RFIFOW(fd,26), (short)RFIFOW(fd,28), (short)RFIFOW(fd,30), (short)RFIFOW(fd,32), (short)RFIFOW(fd,34), (short)RFIFOW(fd,36), ip);
WFIFOL(fd,30) = 0;
}
} else {
memcpy(WFIFOP(fd,6), account_name, 24);
ShowNotice("'ladmin': Attempt to adjust the validity limit of an unknown account (account: %s, ip: %s)\n", account_name, ip);
WFIFOL(fd,30) = 0;
}
WFIFOSET(fd,34);
}
RFIFOSKIP(fd,38);
break;
*/
case 0x7952: // Request about informations of an account (by account name)
if (RFIFOREST(fd) < 26)
return 0;
{
struct mmo_account acc;
WFIFOW(fd,0) = 0x7953;
account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
if( accounts->load_str(accounts, &acc, account_name) )
{
ShowNotice("'ladmin': Sending information of an account (request by the name; account: %s, id: %d, ip: %s)\n", acc.userid, acc.account_id, ip);
WFIFOL(fd,2) = acc.account_id;
WFIFOB(fd,6) = acc.level;
safestrncpy((char*)WFIFOP(fd,7), acc.userid, 24);
WFIFOB(fd,31) = acc.sex;
WFIFOL(fd,32) = acc.logincount;
WFIFOL(fd,36) = acc.state;
safestrncpy((char*)WFIFOP(fd,40), "-", 20); // error message (removed)
safestrncpy((char*)WFIFOP(fd,60), acc.lastlogin, 24);
safestrncpy((char*)WFIFOP(fd,84), acc.last_ip, 16);
safestrncpy((char*)WFIFOP(fd,100), acc.email, 40);
WFIFOL(fd,140) = (unsigned long)acc.expiration_time;
WFIFOL(fd,144) = (unsigned long)acc.unban_time;
WFIFOW(fd,148) = 0; // previously, this was strlen(memo), and memo went afterwards
}
else
{
ShowNotice("'ladmin': Attempt to obtain information (by the name) of an unknown account (account: %s, ip: %s)\n", account_name, ip);
WFIFOL(fd,2) = -1;
safestrncpy((char*)WFIFOP(fd,7), account_name, 24); // not found
}
WFIFOSET(fd,150);
}
RFIFOSKIP(fd,26);
break;
case 0x7954: // Request about information of an account (by account id)
if (RFIFOREST(fd) < 6)
return 0;
{
struct mmo_account acc;
int account_id = RFIFOL(fd,2);
WFIFOHEAD(fd,150);
WFIFOW(fd,0) = 0x7953;
WFIFOL(fd,2) = account_id;
if( accounts->load_num(accounts, &acc, account_id) )
{
ShowNotice("'ladmin': Sending information of an account (request by the id; account: %s, id: %d, ip: %s)\n", acc.userid, account_id, ip);
WFIFOB(fd,6) = acc.level;
safestrncpy((char*)WFIFOP(fd,7), acc.userid, 24);
WFIFOB(fd,31) = acc.sex;
WFIFOL(fd,32) = acc.logincount;
WFIFOL(fd,36) = acc.state;
safestrncpy((char*)WFIFOP(fd,40), "-", 20); // error message (removed)
safestrncpy((char*)WFIFOP(fd,60), acc.lastlogin, 24);
safestrncpy((char*)WFIFOP(fd,84), acc.last_ip, 16);
safestrncpy((char*)WFIFOP(fd,100), acc.email, 40);
WFIFOL(fd,140) = (unsigned long)acc.expiration_time;
WFIFOL(fd,144) = (unsigned long)acc.unban_time;
WFIFOW(fd,148) = 0; // previously, this was strlen(memo), and memo went afterwards
}
else
{
ShowNotice("'ladmin': Attempt to obtain information (by the id) of an unknown account (id: %d, ip: %s)\n", account_id, ip);
safestrncpy((char*)WFIFOP(fd,7), "", 24); // not found
}
WFIFOSET(fd,150);
}
RFIFOSKIP(fd,6);
break;
default:
ShowStatus("'ladmin': End of connection, unknown packet (ip: %s)\n", ip);
set_eof(fd);
return 0;
}
}
return 0;
}

View File

@ -19,7 +19,6 @@
#include <stdlib.h>
#include <string.h>
bool ladmin_auth(struct login_session_data* sd, const char* ip);
struct Login_Config login_config;
int login_fd; // login server socket
@ -1224,7 +1223,7 @@ void login_auth_failed(struct login_session_data* sd, int result)
//----------------------------------------------------------------------------------------
// Default packet parsing (normal players or administation/char-server connection requests)
// Default packet parsing (normal players or char-server connection requests)
//----------------------------------------------------------------------------------------
int parse_login(int fd)
{
@ -1358,7 +1357,6 @@ int parse_login(int fd)
break;
case 0x01db: // Sending request of the coding key
case 0x791a: // Sending request of the coding key (administration packet)
RFIFOSKIP(fd,2);
{
memset(sd->md5key, '\0', sizeof(sd->md5key));
@ -1434,45 +1432,6 @@ int parse_login(int fd)
}
return 0; // processing will continue elsewhere
case 0x7530: // Server version information request
ShowStatus("Sending server version information to ip: %s\n", ip);
RFIFOSKIP(fd,2);
WFIFOHEAD(fd,10);
WFIFOW(fd,0) = 0x7531;
WFIFOB(fd,2) = ATHENA_MAJOR_VERSION;
WFIFOB(fd,3) = ATHENA_MINOR_VERSION;
WFIFOB(fd,4) = ATHENA_REVISION;
WFIFOB(fd,5) = ATHENA_RELEASE_FLAG;
WFIFOB(fd,6) = ATHENA_OFFICIAL_FLAG;
WFIFOB(fd,7) = ATHENA_SERVER_LOGIN;
WFIFOW(fd,8) = ATHENA_MOD_VERSION;
WFIFOSET(fd,10);
break;
case 0x7918: // Request for administation login
if ((int)RFIFOREST(fd) < 4 || (int)RFIFOREST(fd) < ((RFIFOW(fd,2) == 0) ? 28 : 20))
return 0;
{
int passwdenc = (int)RFIFOW(fd,2);
const char* passwd = (char*)RFIFOP(fd,4);
if( passwdenc == 0 ) { // non encrypted password
safestrncpy(sd->passwd, passwd, NAME_LENGTH);
sd->passwdenc = 0;
} else { // encrypted password
memcpy(sd->passwd, passwd, 16); sd->passwd[16] = '\0'; // raw binary data here!
sd->passwdenc = passwdenc;
}
RFIFOSKIP(fd, (passwdenc == 0) ? 28 : 20);
WFIFOHEAD(fd,3);
WFIFOW(fd,0) = 0x7919;
WFIFOB(fd,2) = ladmin_auth(sd, ip) ? 0 : 1;
WFIFOSET(fd,3);
}
break;
default:
ShowNotice("Abnormal end of connection (ip: %s): Unknown packet 0x%x\n", ip, command);
set_eof(fd);
@ -1578,14 +1537,6 @@ int login_config_read(const char* cfgName)
login_config.ipban_cleanup_interval = (unsigned int)atoi(w2);
else if(!strcmpi(w1, "ip_sync_interval"))
login_config.ip_sync_interval = (unsigned int)1000*60*atoi(w2); //w2 comes in minutes.
else if(!strcmpi(w1, "admin_state"))
login_config.admin_state = (bool)config_switch(w2);
else if(!strcmpi(w1, "admin_pass"))
safestrncpy(login_config.admin_pass, w2, sizeof(login_config.admin_pass));
else if(!strcmpi(w1, "admin_allowed_host"))
safestrncpy(login_config.admin_allowed_host, w2, sizeof(login_config.admin_pass));
else if(!strcmpi(w1, "import"))
login_config_read(w2);
else

View File

@ -60,10 +60,6 @@ struct Login_Config {
bool check_client_version; // check the clientversion set in the clientinfo ?
uint32 client_version_to_connect; // the client version needed to connect (if checking is enabled)
bool admin_state; // is ladmin support enabled?
char admin_pass[24]; // security password for ladmin
char admin_allowed_host[32]; // host/ip that is allowed to connect as ladmin
bool ipban; // perform IP blocking (via contents of `ipbanlist`) ?
bool dynamic_pass_failure_ban; // automatic IP blocking due to failed login attemps ?
unsigned int dynamic_pass_failure_ban_interval; // how far to scan the loginlog for password failures

View File

@ -38,7 +38,7 @@ static const int packet_len_table[0x3d] = { // U - used, F - free
60, 3,-1,27,10,-1, 6,-1, // 2af8-2aff: U->2af8, U->2af9, U->2afa, U->2afb, U->2afc, U->2afd, U->2afe, U->2aff
6,-1,18, 7,-1,35,30, 0, // 2b00-2b07: U->2b00, U->2b01, U->2b02, U->2b03, U->2b04, U->2b05, U->2b06, F->2b07
6,30, 0, 0,86, 7,44,34, // 2b08-2b0f: U->2b08, U->2b09, F->2b0a, F->2b0b, U->2b0c, U->2b0d, U->2b0e, U->2b0f
11,10,10, 6,11, 0,266,10, // 2b10-2b17: U->2b10, U->2b11, U->2b12, U->2b13, U->2b14, F->2b15, U->2b16, U->2b17
11,10,10, 0,11, 0,266,10, // 2b10-2b17: U->2b10, U->2b11, U->2b12, F->2b13, U->2b14, F->2b15, U->2b16, U->2b17
2,10, 2,-1,-1,-1, 2, 7, // 2b18-2b1f: U->2b18, U->2b19, U->2b1a, U->2b1b, U->2b1c, U->2b1d, U->2b1e, U->2b1f
-1,10, 8, 2, 2,14,19,19, // 2b20-2b27: U->2b20, U->2b21, U->2b22, U->2b23, U->2b24, U->2b25, U->2b26, U->2b27
};
@ -71,7 +71,7 @@ static const int packet_len_table[0x3d] = { // U - used, F - free
//2b10: Outgoing, chrif_updatefamelist -> 'Update the fame ranking lists and send them'
//2b11: Outgoing, chrif_divorce -> 'tell the charserver to do divorce'
//2b12: Incoming, chrif_divorceack -> 'divorce chars
//2b13: Incoming, chrif_accountdeletion -> 'Delete acc XX, if the player is on, kick ....'
//2b13: FREE
//2b14: Incoming, chrif_accountban -> 'not sure: kick the player with message XY'
//2b15: FREE
//2b16: Outgoing, chrif_ragsrvinfo -> 'sends base / job / drop rates ....'
@ -942,32 +942,6 @@ int chrif_deadopt(int father_id, int mother_id, int child_id)
return 0;
}
/*==========================================
* Disconnection of a player (account has been deleted in login-server) by [Yor]
*------------------------------------------*/
int chrif_accountdeletion(int fd)
{
int acc;
struct map_session_data *sd;
acc = RFIFOL(fd,2);
if (battle_config.etc_log)
ShowNotice("chrif_accountdeletion %d.\n", acc);
sd = map_id2sd(acc);
if (acc > 0) {
if (sd != NULL) {
sd->login_id1++; // change identify, because if player come back in char within the 5 seconds, he can change its characters
clif_displaymessage(sd->fd, "Your account has been deleted (disconnection)...");
set_eof(sd->fd); // forced to disconnect for the change
map_quit(sd); // Remove leftovers (e.g. autotrading) [Paradox924X]
}
} else {
if (sd != NULL)
ShowError("chrif_accountdeletion failed - player not online.\n");
}
return 0;
}
/*==========================================
* Disconnection of a player (account has been banned of has a status, from login-server) by [Yor]
@ -1426,7 +1400,6 @@ int chrif_parse(int fd)
case 0x2b0d: chrif_changedsex(fd); break;
case 0x2b0f: chrif_char_ask_name_answer(RFIFOL(fd,2), (char*)RFIFOP(fd,6), RFIFOW(fd,30), RFIFOW(fd,32)); break;
case 0x2b12: chrif_divorceack(RFIFOL(fd,2), RFIFOL(fd,6)); break;
case 0x2b13: chrif_accountdeletion(fd); break;
case 0x2b14: chrif_accountban(fd); break;
case 0x2b1b: chrif_recvfamelist(fd); break;
case 0x2b1d: chrif_load_scdata(fd); break;

View File

@ -1,85 +0,0 @@
#!/usr/bin/perl -w
##########################################################################
# INFORMATION TOOL ABOUT THE SERVERS VERSION OF ATHENA
#
# By connection on a server, this software display the version of the
# designed server.
#-------------------------------------------------------------------------
# Usages:
# ./checkversion.pl IP:port
# ./checkversion.pl IP port
# perl checkversion.pl IP:port
# perl checkversion.pl IP port
#
# note: default port: 6900
#
# When successfull, the software return the value 0.
#
##########################################################################
#------------------------- start of configuration ------------------------
$connecttimeout = 10; # Connection Timeout (in seconds)
#-------------------------- End of configuration -------------------------
use IO::Socket;
unless($ARGV[0]) {
print "USAGE: $0 server_ip:port\n";
exit(1);
}
$server = $ARGV[0];
$port = $ARGV[1];
$port = $1 if ($server =~ s/:(\d+)//);
$port ||= 6900;
# Connection to the server
my($so,$er) = ();
eval{
$so = IO::Socket::INET->new(
PeerAddr=> $server,
PeerPort=> $port,
Proto => "tcp",
Timeout => $connecttimeout) or $er = 1;
};
if($er || $@) {
print "Can't not connect to server [$server:$port] !\n";
exit(2);
}
# Request for the server version
print $so pack("v",30000); # 0x7530
$so->flush();
# Receiving of the answer of the server
if (read($so,$buf,10) < 10) {
print "Invalid answer. It isn't an athena server or it is a too old version.\n";
exit(5);
}
# Sending end of connection to the server
print $so pack("v",30002); # 0x7532
$so->flush();
# Analyse of the answer
my($ret,$maver,$miver,$rev,$dev,$mod,$type,$mdver) = unpack("v c6 v",$buf);
if ($ret != 30001) { # 0x7531
print "Invalid answer. It isn't an athena server or it is a too old version.\n";
exit(6);
}
my(@stype) = ();
foreach $i(0..3) {
push @stype,(("login","char","inter","map")[$i]) if( $type & (1<<$i) );
}
print " ".join("/",@stype)." server [$server:$port].\n";
printf " Athena version %s-%d.%d", ("stable","dev")[$dev], $maver,$miver;
printf " revision %d",$rev if $rev;
printf "%s%d\n",("","-mod")[$mod],$mdver;
exit(0);

View File

@ -1,149 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{D356871D-58E1-450B-967A-E8E9646175AF}</ProjectGuid>
<RootNamespace>ladmin</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;MINICORE;FD_SETSIZE=4096;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessToFile>false</PreprocessToFile>
<PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
<MinimalRebuild>true</MinimalRebuild>
<ExceptionHandling>
</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalOptions>
</AdditionalOptions>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalOptions>/FIXED:NO %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>libcmtd.lib;oldnames.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)ladmin.exe</OutputFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;MINICORE;FD_SETSIZE=4096;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>false</FunctionLevelLinking>
<AdditionalOptions>
</AdditionalOptions>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>libcmt.lib;oldnames.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)ladmin.exe</OutputFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\ladmin\ladmin.c" />
<ClCompile Include="..\src\common\core.c" />
<ClCompile Include="..\src\common\malloc.c" />
<ClCompile Include="..\src\common\md5calc.c" />
<ClCompile Include="..\src\common\showmsg.c" />
<ClCompile Include="..\src\common\socket.c" />
<ClCompile Include="..\src\common\strlib.c" />
<ClCompile Include="..\src\common\timer.c" />
<ClCompile Include="..\src\common\utils.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\ladmin\ladmin.h" />
<ClInclude Include="..\src\common\core.h" />
<ClInclude Include="..\src\common\malloc.h" />
<ClInclude Include="..\src\common\md5calc.h" />
<ClInclude Include="..\src\common\mmo.h" />
<ClInclude Include="..\src\common\showmsg.h" />
<ClInclude Include="..\src\common\socket.h" />
<ClInclude Include="..\src\common\strlib.h" />
<ClInclude Include="..\src\common\timer.h" />
<ClInclude Include="..\src\common\utils.h" />
<ClInclude Include="..\src\common\version.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -153,7 +153,6 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\login\account_sql.c" />
<ClCompile Include="..\src\login\admin.c" />
<ClCompile Include="..\src\login\ipban_sql.c" />
<ClCompile Include="..\src\login\login.c" />
<ClCompile Include="..\src\login\loginlog_sql.c" />

View File

@ -144,7 +144,6 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\login\account_txt.c" />
<ClCompile Include="..\src\login\admin.c" />
<ClCompile Include="..\src\login\ipban_txt.c" />
<ClCompile Include="..\src\login\login.c" />
<ClCompile Include="..\src\login\loginlog_txt.c" />

View File

@ -207,10 +207,6 @@ SOURCE=..\src\login\account_sql.c
# End Source File
# Begin Source File
SOURCE=..\src\login\admin.c
# End Source File
# Begin Source File
SOURCE=..\src\login\ipban.h
# End Source File
# Begin Source File

View File

@ -195,10 +195,6 @@ SOURCE=..\src\login\account_txt.c
# End Source File
# Begin Source File
SOURCE=..\src\login\admin.c
# End Source File
# Begin Source File
SOURCE=..\src\login\ipban.h
# End Source File
# Begin Source File

View File

@ -150,9 +150,6 @@
<File
RelativePath="..\src\login\account_sql.c">
</File>
<File
RelativePath="..\src\login\admin.c">
</File>
<File
RelativePath="..\src\login\ipban.h">
</File>

View File

@ -153,9 +153,6 @@
<File
RelativePath="..\src\login\account_txt.c">
</File>
<File
RelativePath="..\src\login\admin.c">
</File>
<File
RelativePath="..\src\login\ipban.h">
</File>

View File

@ -1,285 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="ladmin"
ProjectGUID="{D356871D-58E1-450B-967A-E8E9646175AF}"
RootNamespace="ladmin"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".."
IntermediateDirectory="$(ProjectName)\$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\3rdparty\msinttypes\include"
PreprocessorDefinitions="WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;MINICORE;FD_SETSIZE=4096"
GeneratePreprocessedFile="0"
MinimalRebuild="true"
ExceptionHandling="0"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableFunctionLevelLinking="true"
DefaultCharIsUnsigned="false"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/FIXED:NO"
AdditionalDependencies="libcmtd.lib oldnames.lib ws2_32.lib"
OutputFile="$(OutDir)\ladmin.exe"
LinkIncremental="2"
AdditionalLibraryDirectories=""
IgnoreAllDefaultLibraries="true"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".."
IntermediateDirectory="$(ProjectName)\$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="..\3rdparty\msinttypes\include"
PreprocessorDefinitions="WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;MINICORE;FD_SETSIZE=4096"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="false"
DefaultCharIsUnsigned="false"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libcmt.lib oldnames.lib ws2_32.lib"
OutputFile="$(OutDir)\ladmin.exe"
LinkIncremental="1"
AdditionalLibraryDirectories=""
IgnoreAllDefaultLibraries="true"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
LinkTimeCodeGeneration="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="ladmin"
>
<File
RelativePath="..\src\ladmin\ladmin.c"
>
</File>
<File
RelativePath="..\src\ladmin\ladmin.h"
>
</File>
</Filter>
<Filter
Name="common"
>
<File
RelativePath="..\src\common\core.c"
>
</File>
<File
RelativePath="..\src\common\core.h"
>
</File>
<File
RelativePath="..\src\common\malloc.c"
>
</File>
<File
RelativePath="..\src\common\malloc.h"
>
</File>
<File
RelativePath="..\src\common\md5calc.c"
>
</File>
<File
RelativePath="..\src\common\md5calc.h"
>
</File>
<File
RelativePath="..\src\common\mmo.h"
>
</File>
<File
RelativePath="..\src\common\showmsg.c"
>
</File>
<File
RelativePath="..\src\common\showmsg.h"
>
</File>
<File
RelativePath="..\src\common\socket.c"
>
</File>
<File
RelativePath="..\src\common\socket.h"
>
</File>
<File
RelativePath="..\src\common\strlib.c"
>
</File>
<File
RelativePath="..\src\common\strlib.h"
>
</File>
<File
RelativePath="..\src\common\timer.c"
>
</File>
<File
RelativePath="..\src\common\timer.h"
>
</File>
<File
RelativePath="..\src\common\utils.c"
>
</File>
<File
RelativePath="..\src\common\utils.h"
>
</File>
<File
RelativePath="..\src\common\version.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -208,10 +208,6 @@
RelativePath="..\src\login\account_sql.c"
>
</File>
<File
RelativePath="..\src\login\admin.c"
>
</File>
<File
RelativePath="..\src\login\ipban.h"
>

View File

@ -203,10 +203,6 @@
RelativePath="..\src\login\account_txt.c"
>
</File>
<File
RelativePath="..\src\login\admin.c"
>
</File>
<File
RelativePath="..\src\login\ipban.h"
>

View File

@ -1,290 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="ladmin"
ProjectGUID="{D356871D-58E1-450B-967A-E8E9646175AF}"
RootNamespace="ladmin"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".."
IntermediateDirectory="$(ProjectName)\$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\3rdparty\msinttypes\include"
PreprocessorDefinitions="WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;MINICORE;FD_SETSIZE=4096"
GeneratePreprocessedFile="0"
MinimalRebuild="true"
ExceptionHandling="0"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableFunctionLevelLinking="true"
DefaultCharIsUnsigned="false"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/FIXED:NO"
AdditionalDependencies="libcmtd.lib oldnames.lib ws2_32.lib"
OutputFile="$(OutDir)\ladmin.exe"
LinkIncremental="2"
AdditionalLibraryDirectories=""
IgnoreAllDefaultLibraries="true"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".."
IntermediateDirectory="$(ProjectName)\$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="..\3rdparty\msinttypes\include"
PreprocessorDefinitions="WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;MINICORE;FD_SETSIZE=4096"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="false"
DefaultCharIsUnsigned="false"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libcmt.lib oldnames.lib ws2_32.lib"
OutputFile="$(OutDir)\ladmin.exe"
LinkIncremental="1"
AdditionalLibraryDirectories=""
IgnoreAllDefaultLibraries="true"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
LinkTimeCodeGeneration="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="ladmin"
>
<File
RelativePath="..\src\ladmin\ladmin.c"
>
</File>
<File
RelativePath="..\src\ladmin\ladmin.h"
>
</File>
</Filter>
<Filter
Name="common"
>
<File
RelativePath="..\src\common\core.c"
>
</File>
<File
RelativePath="..\src\common\core.h"
>
</File>
<File
RelativePath="..\src\common\malloc.c"
>
</File>
<File
RelativePath="..\src\common\malloc.h"
>
</File>
<File
RelativePath="..\src\common\md5calc.c"
>
</File>
<File
RelativePath="..\src\common\md5calc.h"
>
</File>
<File
RelativePath="..\src\common\mmo.h"
>
</File>
<File
RelativePath="..\src\common\showmsg.c"
>
</File>
<File
RelativePath="..\src\common\showmsg.h"
>
</File>
<File
RelativePath="..\src\common\socket.c"
>
</File>
<File
RelativePath="..\src\common\socket.h"
>
</File>
<File
RelativePath="..\src\common\strlib.c"
>
</File>
<File
RelativePath="..\src\common\strlib.h"
>
</File>
<File
RelativePath="..\src\common\timer.c"
>
</File>
<File
RelativePath="..\src\common\timer.h"
>
</File>
<File
RelativePath="..\src\common\utils.c"
>
</File>
<File
RelativePath="..\src\common\utils.h"
>
</File>
<File
RelativePath="..\src\common\version.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -213,10 +213,6 @@
RelativePath="..\src\login\account_sql.c"
>
</File>
<File
RelativePath="..\src\login\admin.c"
>
</File>
<File
RelativePath="..\src\login\ipban.h"
>

View File

@ -208,10 +208,6 @@
RelativePath="..\src\login\account_txt.c"
>
</File>
<File
RelativePath="..\src\login\admin.c"
>
</File>
<File
RelativePath="..\src\login\ipban.h"
>