[mw-devel] [Git][milliways/mw][master] Show onoff messages even if no mwscript handlers are found

Andrew Price welshbyte at sucs.org
Sun Apr 7 10:05:02 BST 2019


Andrew Price pushed to branch master at milliways / mw


Commits:
5fcf81d0 by Andrew Price at 2019-04-07T09:03:49Z
Show onoff messages even if no mwscript handlers are found

Just a quick fix until all the mwscript event handler stuff is mucked
out.

- - - - -


1 changed file:

- src/client/incoming.c


Changes:

=====================================
src/client/incoming.c
=====================================
@@ -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);



View it on GitLab: https://projects.sucs.org/milliways/mw/commit/5fcf81d04891ae10bf8afc9adba39f23cb7fa900

-- 
View it on GitLab: https://projects.sucs.org/milliways/mw/commit/5fcf81d04891ae10bf8afc9adba39f23cb7fa900
You're receiving this email because of your account on projects.sucs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/mw-devel/attachments/20190407/2178505c/attachment.html>


More information about the mw-devel mailing list