[mw-devel] MW3 r946 - trunk/src
arthur at sucs.org
arthur at sucs.org
Wed Apr 18 19:05:16 BST 2007
Author: arthur
Date: 2007-04-18 19:05:16 +0100 (Wed, 18 Apr 2007)
New Revision: 946
Modified:
trunk/src/incoming.c
trunk/src/script.c
Log:
fix it so that multiple event handlers dont break script_output
Modified: trunk/src/incoming.c
===================================================================
--- trunk/src/incoming.c 2007-04-12 10:10:51 UTC (rev 945)
+++ trunk/src/incoming.c 2007-04-18 18:05:16 UTC (rev 946)
@@ -139,6 +139,7 @@
if (cp_flags(user->chatprivs,CP_SCRIPT,CM_MODE_ANY))
{
event_name = NULL;
+ script_output=1;
while ((event_name = NextLink(event_list, event_name)) != NULL)
{
ExecEvent(event_name, new->text, "text", new->from, new->preamble);
@@ -160,6 +161,7 @@
msg = remove_first_word(new->text);
snprintf(callfunc, (MAXTEXTLENGTH-1<strlen(new->text))?MAXTEXTLENGTH-1:strlen(new->text) - strlen(msg), "%s", new->text);
+ script_output=1;
if ((funcname = FindLinks(rpc_list, callfunc)) != NULL)
{
@@ -175,6 +177,7 @@
/* go through list of ipc functions */
ipc_name = NULL;
+ script_output=1;
while ((ipc_name = NextLink(ipc_list, ipc_name)) != NULL)
{
ExecEvent(ipc_name, new->text, "IPC", new->from, 0);
@@ -941,6 +944,7 @@
/* find the force function */
force_name = NULL;
+ script_output=1;
if ((force_name = NextLink(force_list, force_name)) != NULL)
{
if (!ExecEvent(force_name, eventtext, "Force", from, 0))
Modified: trunk/src/script.c
===================================================================
--- trunk/src/script.c 2007-04-12 10:10:51 UTC (rev 945)
+++ trunk/src/script.c 2007-04-18 18:05:16 UTC (rev 946)
@@ -854,7 +854,6 @@
compare_count=0;
compare_match=0;
script_offset=0;
- script_output=1;
if (event_user!=NULL) free(event_user);
VAR_NEWLIST(&args);
More information about the mw-devel
mailing list