Commit 8511c565 authored by Andrew Price's avatar Andrew Price
Browse files

Don't use json_boolean()

parent b1196d3a
Loading
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ int announce_logon(const char *usr, int type, int quiet)
	json_addstring(j, "user", usr);
	json_addint(j, "action", ONOFF_LOGON);
	json_addint(j, "type", type);
	json_object_set(j, "quiet", json_boolean(quiet));
	json_object_set(j, "quiet", quiet ? json_true() : json_false());

	msg = ipcmsg_create(IPC_CHECKONOFF, user->posn);
	ipcmsg_destination(msg, SYSTEM_USER);
@@ -38,7 +38,7 @@ int announce_logoff(const char *usr, int type, const char *agent, const char *re
	json_addstring(j, "user", usr);
	json_addint(j, "action", ONOFF_LOGOFF);
	json_addint(j, "type", type);
	json_object_set(j, "quiet", json_boolean(quiet));
	json_object_set(j, "quiet", quiet ? json_true() : json_false());
	if (agent != NULL)
		json_addstring(j, "agent", agent);
	if (reason != NULL)
@@ -62,7 +62,7 @@ int announce_join(const char *usr, int channel, int type, const char *agent, int
	json_addint(j, "action", ONOFF_JOIN);
	json_addint(j, "channel", channel);
	json_addint(j, "type", type);
	json_object_set(j, "quiet", json_boolean(quiet));
	json_object_set(j, "quiet", quiet ? json_true() : json_false());
	if (agent != NULL)
		json_addstring(j, "agent", agent);

@@ -84,7 +84,7 @@ int announce_leave(const char *usr, int channel, int type, const char *agent, co
	json_addint(j, "action", ONOFF_LEAVE);
	json_addint(j, "channel", channel);
	json_addint(j, "type", type);
	json_object_set(j, "quiet", json_boolean(quiet));
	json_object_set(j, "quiet", quiet ? json_true() : json_false());
	if (agent != NULL)
		json_addstring(j, "agent", agent);
	if (lmsg != NULL)