diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-08-15 02:28:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-08-15 02:28:24 +0300 |
commit | 94df0300da69e3dde9bc05f32137dd90c43040e8 (patch) | |
tree | 53b540f7483533a281ffb66e0c39765a8f65508a /src/map/atcommand.c | |
parent | 6795414243a08d47bc111e23c9c0f09218260ccf (diff) | |
parent | d95f3b14d78305ea48834212684c73086555f74f (diff) | |
download | hercules-94df0300da69e3dde9bc05f32137dd90c43040e8.tar.gz hercules-94df0300da69e3dde9bc05f32137dd90c43040e8.tar.bz2 hercules-94df0300da69e3dde9bc05f32137dd90c43040e8.tar.xz hercules-94df0300da69e3dde9bc05f32137dd90c43040e8.zip |
Merge pull request #643 from HerculesWS/hpmfixes_v2
HPM Compatibility Improvements
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index fb0b89381..95db0c2e6 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -58,6 +58,7 @@ #include <string.h> struct atcommand_interface atcommand_s; +struct atcommand_interface *atcommand; static char atcmd_output[CHAT_SIZE_MAX]; static char atcmd_player_name[NAME_LENGTH]; @@ -83,7 +84,7 @@ const char* atcommand_msgsd(struct map_session_data *sd, int msg_number) { } const char* atcommand_msgfd(int fd, int msg_number) { - struct map_session_data *sd = session_isValid(fd) ? session[fd]->session_data : NULL; + struct map_session_data *sd = sockt->session_is_valid(fd) ? sockt->session[fd]->session_data : NULL; if( !(msg_number >= 0 && msg_number < MAX_MSG) ) return "??"; if( !sd || sd->lang_id >= atcommand->max_message_table || !atcommand->msg_table[sd->lang_id][msg_number] ) @@ -3676,7 +3677,7 @@ ACMD(reloadscript) { } mapit->free(iter); - flush_fifos(); + sockt->flush_fifos(); map->reloadnpc(true); // reload config files seeking for npcs script->reload(); npc->reload(); @@ -10199,7 +10200,7 @@ bool atcommand_can_use2(struct map_session_data *sd, const char *command, AtComm bool atcommand_hp_add(char *name, AtCommandFunc func) { /* if commands are added after group permissions are thrown in, they end up with no permissions */ /* so we restrict commands to be linked in during boot */ - if( runflag == MAPSERVER_ST_RUNNING ) { + if( core->runflag == MAPSERVER_ST_RUNNING ) { ShowDebug("atcommand_hp_add: Commands can't be added after server is ready, skipping '%s'...\n",name); return false; } @@ -10231,7 +10232,7 @@ void atcommand_db_clear(void) { } void atcommand_doload(void) { - if( runflag >= MAPSERVER_ST_RUNNING ) + if( core->runflag >= MAPSERVER_ST_RUNNING ) atcommand->cmd_db_clear(); if( atcommand->db == NULL ) atcommand->db = stridb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, ATCOMMAND_LENGTH); |