Commit 5fcf81d0 authored by Andrew Price's avatar Andrew Price
Browse files

Show onoff messages even if no mwscript handlers are found

Just a quick fix until all the mwscript event handler stuff is mucked
out.
parent 260304b4
Loading
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -234,9 +234,6 @@ void DisplayStack(void)
				onoff_name = NULL;
				onoff_name = NextLink(onoff_list, onoff_name);

				/* if no function found, skip everything else */
				if (onoff_name == NULL) break;

				json_t *j = ipcmsg_json_decode(new->msg);
				uname = json_getstring(j, "user");
				action = json_getint(j, "action");
@@ -307,7 +304,7 @@ void DisplayStack(void)
				a.version[0] = '3';
				if (reason != NULL)
					snprintf(a.reason, MAXTEXTLENGTH - 1, "%s", reason);
				if (cp_test(user, CP_SCRIPT))
				if (cp_test(user, CP_SCRIPT) && onoff_name != NULL)
					ExecEvent2(onoff_name, "CheckOnOff", new->from, 0, 6, aargs);
				if (script_output && !isquiet)
					display_onoff(action, uname, room);