static bool msgscmd(UAContext *ua, const char *cmd) { MSGSRES *msgs = NULL; LockRes(); foreach_res(msgs, R_MSGS) { ua->send_msg("%s\n", msgs->name()); }
bool dot_msgs_cmd(UAContext *ua, const char *cmd) { MSGSRES *msgs = NULL; LockRes(); ua->send->array_start("messages"); foreach_res(msgs, R_MSGS) { ua->send->object_start(); ua->send->object_key_value("text", msgs->name(), "%s\n"); ua->send->object_end(); }