Pārlūkot izejas kodu

* Silenced the plugin export messages during startup [ultramage]
* Fixed an old debug message displaying %d instead of a number
* Commented out a login_log call (sql doesn't implement that function!)
* Found the reason why the console didn't want to run on windows
* Moved the plugin.def file to the plugins dir and added console.def

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9632 54d463be-8e91-2dee-dedb-b68131a5f0ec

ultramage 18 gadi atpakaļ
vecāks
revīzija
284b66e65c

+ 6 - 0
Changelog-Trunk.txt

@@ -4,6 +4,12 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2007/01/08
+	* Moved the plugin.def file to the plugins dir and added console.def
+	* Found the reason why the console didn't want to run on windows
+	  (Microsoft uses !0 and unix uses 0 in pipe_create)
+	* Commented out a login_log call (sql doesn't implement that function!)
+	* Fixed an old debug message displaying %d instead of a number
+	* Silenced the plugin export messages during startup [ultramage]
 	* Added a precompiler error when the shutdown defines are not found.
 	* Added parse_console to the plugin API.
 	* Added plugin for parsing the console. (working with cygwin)

+ 6 - 0
eAthena-8.sln

@@ -12,6 +12,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server_sql", "vcproj-
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_sql", "vcproj-8\map-server_sql.vcproj", "{D356871D-58E1-450B-967A-E6E9646175AF}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-console", "vcproj-8\plugin-console.vcproj", "{97D96B7A-817F-4610-8EF4-966384850E65}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
@@ -39,6 +41,10 @@ Global
 		{D356871D-58E1-450B-967A-E6E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
 		{D356871D-58E1-450B-967A-E6E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
 		{D356871D-58E1-450B-967A-E6E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+		{97D96B7A-817F-4610-8EF4-966384850E65}.Debug|Win32.ActiveCfg = Debug|Win32
+		{97D96B7A-817F-4610-8EF4-966384850E65}.Debug|Win32.Build.0 = Debug|Win32
+		{97D96B7A-817F-4610-8EF4-966384850E65}.Release|Win32.ActiveCfg = Release|Win32
+		{97D96B7A-817F-4610-8EF4-966384850E65}.Release|Win32.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 1 - 1
src/common/plugins.c

@@ -123,7 +123,7 @@ int plugin_event_trigger(char* name)
 
 int export_symbol(void* var, size_t offset)
 {
-	ShowDebug("export_symbol(0x%x,%d)\n", var,offset);
+	//ShowDebug("export_symbol(0x%x,%d)\n", var,offset);
 
 	// add to the end of the list
 	if( offset < 0 )

+ 1 - 1
src/common/socket.c

@@ -327,7 +327,7 @@ int make_listen_bind(long ip,int port)
 	fd = (int)socket( AF_INET, SOCK_STREAM, 0 );
 
 	if (fd == INVALID_SOCKET) {
-		ShowError("socket() creation failed (code %d)!\n", fd, s_errno);
+		ShowError("socket() creation failed (code %d)!\n", s_errno);
 		exit(1);
 	}
 

+ 1 - 1
src/login_sql/login.c

@@ -1959,7 +1959,7 @@ int parse_console(char* buf)
 
 	sscanf(buf, "%[^\n]", command);
 
-	login_log("Console command :%s" RETCODE, command);
+	//login_log("Console command :%s" RETCODE, command);
 
 	if( strcmpi("shutdown", command) == 0 ||
 		strcmpi("exit", command) == 0 ||

+ 1 - 1
src/plugins/console.c

@@ -26,7 +26,7 @@
 	}while(0)
 #define sleep Sleep
 
-#define pipe_create(p) ( CreatePipe(&p[PIPE_READ], &p[PIPE_WRITE], NULL, 1) != 0 )
+#define pipe_create(p) (CreatePipe(&p[PIPE_READ], &p[PIPE_WRITE], NULL, 1) == 0)
 #define pipe_read(p,data,len) do{ DWORD _b_; ReadFile(p[PIPE_READ], data, len, &_b_, NULL); }while(0)
 #define pipe_write(p,data,len) do{ DWORD _b_; WriteFile(p[PIPE_WRITE], data, len, &_b_, NULL); }while(0)
 #define pipe_close(p,side) CloseHandle(p[side])

+ 11 - 0
src/plugins/console.def

@@ -0,0 +1,11 @@
+EXPORTS
+	; common exports
+	plugin_info         DATA
+	plugin_event_table  DATA
+	plugin_call_table   DATA
+	
+	; console-specific exports
+        console_init
+	console_final
+	console_start
+	console_stop

+ 0 - 0
vcproj-8/plugin.def → src/plugins/plugin.def