[mw-devel] MW3 r1103 - trunk/src

psycodom at sucs.org psycodom at sucs.org
Fri Nov 13 12:24:46 GMT 2009


Author: psycodom
Date: 2009-11-13 12:24:46 +0000 (Fri, 13 Nov 2009)
New Revision: 1103

Modified:
   trunk/src/talker.c
Log:
fixes a silly bug with mw-script/jscript ipc/rpc broadcasts that seems to have snuck in with the ipc.c rewrite.


Modified: trunk/src/talker.c
===================================================================
--- trunk/src/talker.c	2009-11-13 11:10:59 UTC (rev 1102)
+++ trunk/src/talker.c	2009-11-13 12:24:46 UTC (rev 1103)
@@ -1650,9 +1650,14 @@
 {
 	int count;
 
-	if (broadcast) to = NULL;
-	count = ipc_send_to_username(to, IPC_SCRIPTIPC, text);
-
+	if (broadcast) 
+	{
+		count = ipc_send_to_all(IPC_SCRIPTIPC, text, NULL, NULL);
+	}
+	else
+	{
+		count = ipc_send_to_username(to, IPC_SCRIPTIPC, text);
+	}
 	if (count==0)
 	{
 		printf("User %s not logged on.\n",to);
@@ -1670,10 +1675,15 @@
 	char buff[MAXTEXTLENGTH];
 	int count;
 
-	if (broadcast) to = NULL;
 	snprintf(buff, MAXTEXTLENGTH, "%s %s", type, text);
-	count = ipc_send_to_username(to, IPC_SCRIPTRPC, buff);
-
+	if(broadcast)
+	{
+		count = ipc_send_to_all(IPC_SCRIPTRPC, buff, NULL, NULL); 
+	}
+	else
+	{
+		count = ipc_send_to_username(to, IPC_SCRIPTRPC, buff);
+	}
 	if (count==0)
 	{
 		printf("User %s not logged on.\n",to);




More information about the mw-devel mailing list