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

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
Pipeline #560 passed with stage
in 7 minutes and 39 seconds
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment