diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-07-26 20:45:57 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-07-26 20:45:57 +0000 |
commit | 1624d1d57db3cfde3b4f42a55580f5a1e742f28e (patch) | |
tree | aedd8d2afa77616e61bf8f50249575294b06a528 /src/map/map.c | |
parent | e3879120d578c07cc6ca2dfeeec577e8461a6c52 (diff) | |
download | hercules-1624d1d57db3cfde3b4f42a55580f5a1e742f28e.tar.gz hercules-1624d1d57db3cfde3b4f42a55580f5a1e742f28e.tar.bz2 hercules-1624d1d57db3cfde3b4f42a55580f5a1e742f28e.tar.xz hercules-1624d1d57db3cfde3b4f42a55580f5a1e742f28e.zip |
Merged the /loginmerge branch (topic:192754)
* the login server storage, ipban and logging systems have been abstracted and now provide a common interface; the rest has been merged into a single login server core (no more login/login_sql duplicity)
* storage systems are now added via compiler options (WITH_SQL / WITH_TXT)
* multiple storage engines can be compiled in at the same time, and the config option account.engine defines which one will be used.
* due to MySQL autoincrement limitations, accounts with id '0' will not be supported; account IDs from this point on should start from '1'.
* login_log() functions now again record IP addresses in dotted format, not as 4-byte integers (undo from r6868).
* removed config options that defined column names in the login table
* removed `memo` and `error message` columns from login db/savefile
* moved `loginlog` table to the logs database
* added sql files upgrade_svn12975.sql and upgrade_svn12975_log.sql
* due to changes to the login table layout, I added an !optional! sql file (upgrade_svn12975_view.sql) that will provide a certain degree of backwards compatibility with existing software; read the instructions inside carefully!
* moved third-party includes/libs to a separate directory
* updated project files / makefiles
Changed the way GM levels are handled
* removed conf/gm_account.txt
* added the gm level column to the txt savefile (after 'email' column)
* gm level information is now transferred along with account data
For open problems see bugreport:1889.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13000 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.c')
-rw-r--r-- | src/map/map.c | 44 |
1 files changed, 2 insertions, 42 deletions
diff --git a/src/map/map.c b/src/map/map.c index 07d353aed..8c80644d0 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -79,8 +79,6 @@ Sql* logmysql_handle; #endif /* not TXT_ONLY */ -int lowest_gm_level = 1; - // This param using for sending mainchat // messages like whispers to this nick. [LuzZza] char main_chat_nick[16] = "Main"; @@ -2955,13 +2953,8 @@ int inter_config_read(char *cfgName) i=sscanf(line,"%[^:]: %[^\r\n]",w1,w2); if(i!=2) continue; - if(strcmpi(w1,"party_share_level")==0){ - party_share_level = config_switch(w2); - } else if(strcmpi(w1,"lowest_gm_level")==0){ - lowest_gm_level = atoi(w2); - - /* Main chat nick [LuzZza] */ - } else if(strcmpi(w1, "main_chat_nick")==0){ + + if(strcmpi(w1, "main_chat_nick")==0){ strcpy(main_chat_nick, w2); #ifndef TXT_ONLY @@ -3068,37 +3061,6 @@ int log_sql_init(void) return 0; } -/*============================================= - * Does a mysql_ping to all connection handles - *---------------------------------------------*/ -int map_sql_ping(int tid, unsigned int tick, int id, intptr data) -{ - ShowInfo("Pinging SQL server to keep connection alive...\n"); - Sql_Ping(mmysql_handle); - if (log_config.sql_logs) - Sql_Ping(logmysql_handle); - return 0; -} - -int sql_ping_init(void) -{ - uint32 connection_timeout, connection_ping_interval; - - // set a default value - connection_timeout = 28800; // 8 hours - - // ask the mysql server for the timeout value - Sql_GetTimeout(mmysql_handle, &connection_timeout); - if (connection_timeout < 60) - connection_timeout = 60; - - // establish keepalive - connection_ping_interval = connection_timeout - 30; // 30-second reserve - add_timer_func_list(map_sql_ping, "map_sql_ping"); - add_timer_interval(gettick() + connection_ping_interval*1000, map_sql_ping, 0, 0, connection_ping_interval*1000); - - return 0; -} #endif /* not TXT_ONLY */ int map_db_final(DBKey k,void *d,va_list ap) @@ -3436,8 +3398,6 @@ int do_init(int argc, char *argv[]) #ifndef TXT_ONLY /* mail system [Valaris] */ if (log_config.sql_logs) log_sql_init(); - - sql_ping_init(); #endif /* not TXT_ONLY */ npc_event_do_oninit(); // npcのOnInitイベント?行 |