| 400 char *buf; |
400 char *buf; |
| 401 |
401 |
| 402 if (args && args[0]) { |
402 if (args && args[0]) { |
| 403 if (irc_ischannel(args[0])) |
403 if (irc_ischannel(args[0])) |
| 404 return 0; |
404 return 0; |
| 405 stamp = g_strdup_printf("\001PING %lu\001", time(NULL)); |
405 stamp = g_strdup_printf("\001PING %" G_GINT64_FORMAT "\001", |
| |
406 g_get_monotonic_time()); |
| 406 buf = irc_format(irc, "vn:", "PRIVMSG", args[0], stamp); |
407 buf = irc_format(irc, "vn:", "PRIVMSG", args[0], stamp); |
| 407 g_free(stamp); |
408 g_free(stamp); |
| 408 } else if (target) { |
409 } else if (target) { |
| 409 stamp = g_strdup_printf("%s %lu", target, time(NULL)); |
410 stamp = g_strdup_printf("%s %" G_GINT64_FORMAT, target, |
| |
411 g_get_monotonic_time()); |
| 410 buf = irc_format(irc, "v:", "PING", stamp); |
412 buf = irc_format(irc, "v:", "PING", stamp); |
| 411 g_free(stamp); |
413 g_free(stamp); |
| 412 } else { |
414 } else { |
| 413 stamp = g_strdup_printf("%lu", time(NULL)); |
415 stamp = g_strdup_printf("%lu", time(NULL)); |
| 414 buf = irc_format(irc, "vv", "PING", stamp); |
416 buf = irc_format(irc, "vv", "PING", stamp); |