void wd_server_send_server_info(wi_boolean_t broadcast) { wi_string_t *string, *start_date; start_date = wi_date_rfc3339_string(wd_start_date); string = wi_string_with_format(WI_STR("%#@%c%#@%c%#@%c%#@%c%#@%c%u%c%llu"), wd_server_version_string, WD_FIELD_SEPARATOR, wd_protocol_version_string, WD_FIELD_SEPARATOR, wd_settings.name, WD_FIELD_SEPARATOR, wd_settings.description, WD_FIELD_SEPARATOR, start_date, WD_FIELD_SEPARATOR, wd_files_count, WD_FIELD_SEPARATOR, wd_files_size); if(broadcast) wd_broadcast(wd_public_chat, 200, WI_STR("%#@"), string); else wd_reply(200, WI_STR("%#@"), string); }
void wd_chat_broadcast_topic(wd_chat_t *chat) { wi_string_t *string; wd_topic_t *topic; topic = wd_chat_topic(chat); if(topic) { string = wi_date_rfc3339_string(topic->date); wd_broadcast(chat, 341, WI_STR("%u%c%#@%c%#@%c%#@%c%#@%c%#@"), chat->cid, WD_FIELD_SEPARATOR, topic->nick, WD_FIELD_SEPARATOR, topic->login, WD_FIELD_SEPARATOR, topic->ip, WD_FIELD_SEPARATOR, string, WD_FIELD_SEPARATOR, topic->topic); } }