[mw-devel] MW3 r962 - trunk/src

psycodom at sucs.org psycodom at sucs.org
Fri May 11 18:42:08 BST 2007


Author: psycodom
Date: 2007-05-11 18:42:08 +0100 (Fri, 11 May 2007)
New Revision: 962

Modified:
   trunk/src/talker.c
Log:
Fixes #26 by removing a second read of the userdb in states 1 and 3 (messages going to every room).
Were deciding to send based on the chatprivs of the user in the db after the user we were sending to.


Modified: trunk/src/talker.c
===================================================================
--- trunk/src/talker.c	2007-05-03 17:31:52 UTC (rev 961)
+++ trunk/src/talker.c	2007-05-11 17:42:08 UTC (rev 962)
@@ -1390,7 +1390,6 @@
 				// Drop through
 			case 3:
 				/* all rooms */
-				read(ufile,&u,sizeof(u));
 				if (cm_flags(u.chatmode,CM_ONCHAT,CM_MODE_ALL))
 				{
 					if (getpid() != w.pid) sendflag = 1;
@@ -1490,6 +1489,8 @@
 			if (mud) sendbuff = mbuff;
 			else sendbuff = buff;
 		}
+		
+		sendflag = 0;
 
 		switch (state) {
 			case 0:
@@ -1503,7 +1504,6 @@
 				// Drop through
 			case 3:
 				/* all rooms */
-				read(ufile,&u,sizeof(u));
 				if (cm_flags(u.chatmode,CM_ONCHAT,CM_MODE_ALL))
 				{
 					if (getpid() != w.pid) sendflag = 1;





More information about the mw-devel mailing list