void notify_showlist (struct session *sess, const message_tags_data *tags_data) { char outbuf[256]; struct notify *notify; GSList *list = notify_list; struct notify_per_server *servnot; int i = 0; EMIT_SIGNAL_TIMESTAMP (XP_TE_NOTIFYHEAD, sess, NULL, NULL, NULL, NULL, 0, tags_data->timestamp); while (list) { i++; notify = (struct notify *) list->data; servnot = notify_find_server_entry (notify, sess->server); if (servnot && servnot->ison) snprintf (outbuf, sizeof (outbuf), _(" %-20s online\n"), notify->name); else snprintf (outbuf, sizeof (outbuf), _(" %-20s offline\n"), notify->name); PrintTextTimeStamp (sess, outbuf, tags_data->timestamp); list = list->next; } if (i) { sprintf (outbuf, "%d", i); EMIT_SIGNAL_TIMESTAMP (XP_TE_NOTIFYNUMBER, sess, outbuf, NULL, NULL, NULL, 0, tags_data->timestamp); } else EMIT_SIGNAL_TIMESTAMP (XP_TE_NOTIFYEMPTY, sess, NULL, NULL, NULL, NULL, 0, tags_data->timestamp); }
static void display_event (session *sess, int event, char **args, unsigned int stripcolor_args, time_t timestamp) { char o[4096]; format_event (sess, event, args, o, sizeof (o), stripcolor_args); if (o[0]) PrintTextTimeStamp (sess, o, timestamp); }
void PrintTextTimeStampf (session *sess, time_t timestamp, const char *format, ...) { va_list args; char *buf; va_start (args, format); buf = g_strdup_vprintf (format, args); va_end (args); PrintTextTimeStamp (sess, buf, timestamp); g_free (buf); }
void PrintText (session *sess, char *text) { PrintTextTimeStamp (sess, text, 0); }