[mw-devel] MW3 r919 - branches/jscript/src
arthur at sucs.org
arthur at sucs.org
Tue Mar 20 09:35:02 GMT 2007
Author: arthur
Date: 2007-03-20 09:35:02 +0000 (Tue, 20 Mar 2007)
New Revision: 919
Modified:
branches/jscript/src/incoming.c
branches/jscript/src/js.c
branches/jscript/src/script.c
branches/jscript/src/script.h
Log:
return false from js events to suppress output
Modified: branches/jscript/src/incoming.c
===================================================================
--- branches/jscript/src/incoming.c 2007-03-19 22:04:59 UTC (rev 918)
+++ branches/jscript/src/incoming.c 2007-03-20 09:35:02 UTC (rev 919)
@@ -29,7 +29,7 @@
extern Alias onoff_list;
extern Alias ipc_list;
extern Alias force_list;
-extern int script_output;
+//extern int script_output;
extern struct person *user;
extern long userposn;
extern struct room myroom;
Modified: branches/jscript/src/js.c
===================================================================
--- branches/jscript/src/js.c 2007-03-19 22:04:59 UTC (rev 918)
+++ branches/jscript/src/js.c 2007-03-20 09:35:02 UTC (rev 919)
@@ -412,9 +412,8 @@
if (!ret) {
printf("JS function '%s' (args: %d) not found.\n", name, argc);
}
- show_type("js_exec(rval)", rval);
+ //show_type("js_exec(rval)", rval);
if (JSVAL_IS_BOOLEAN(rval) && JSVAL_TO_BOOLEAN(rval)==0) {
- printf("Disable script output\n");
script_output=0;
}
JS_free(jscx, js_string);
Modified: branches/jscript/src/script.c
===================================================================
--- branches/jscript/src/script.c 2007-03-19 22:04:59 UTC (rev 918)
+++ branches/jscript/src/script.c 2007-03-20 09:35:02 UTC (rev 919)
@@ -65,7 +65,7 @@
char *event_user=NULL;
/* do we want to output text after an event? */
-int script_output = 1;
+volatile int script_output = 1;
/* logon type */
int talker_logontype = 0;
Modified: branches/jscript/src/script.h
===================================================================
--- branches/jscript/src/script.h 2007-03-19 22:04:59 UTC (rev 918)
+++ branches/jscript/src/script.h 2007-03-20 09:35:02 UTC (rev 919)
@@ -231,7 +231,7 @@
extern int compare_match;
extern char *event_body_text;
extern int script_offset;
-extern int script_output;
+extern volatile int script_output;
extern char *event_user;
char *eval_arg(char *arg, int argc, char **argv);
More information about the mw-devel
mailing list