Changeset 9767d03 for irc_send.c
- Timestamp:
- 2018-07-31T04:41:55Z (6 years ago)
- Branches:
- master
- Children:
- fa1bc1d
- Parents:
- f7cc734
- git-author:
- dequis <dx@…> (31-07-18 04:41:21)
- git-committer:
- dequis <dx@…> (31-07-18 04:41:55)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
irc_send.c
rf7cc734 r9767d03 136 136 137 137 dst = irc_user_msgdest(iu); 138 irc_send_msg(iu, cmd, dst, text, NULL , 0);138 irc_send_msg(iu, cmd, dst, text, NULL); 139 139 } 140 140 … … 363 363 } 364 364 365 void irc_send_msg(irc_user_t *iu, const char *type, const char *dst, const char *msg, const char *prefix, time_t ts) 365 void irc_send_msg(irc_user_t *iu, const char *type, const char *dst, const char *msg, const char *prefix) 366 { 367 irc_send_msg_ts(iu, type, dst, msg, prefix, 0); 368 } 369 370 void irc_send_msg_ts(irc_user_t *iu, const char *type, const char *dst, const char *msg, const char *prefix, time_t ts) 366 371 { 367 372 char last = 0; … … 384 389 } 385 390 if (*s == 0 || *s == '\n') { 386 if (ts) 391 if (ts) { 387 392 tags = irc_format_servertime(iu->irc, ts); 393 } 388 394 if (g_strncasecmp(line, "/me ", 4) == 0 && (!prefix || !*prefix) && 389 395 g_strcasecmp(type, "PRIVMSG") == 0) { … … 391 397 strncat(raw_msg, line + 4, s - line - 4); 392 398 strcat(raw_msg, "\001"); 393 irc_send_msg_raw (iu, type, dst, tags, raw_msg);399 irc_send_msg_raw_tags(iu, type, dst, tags, raw_msg); 394 400 } else { 395 401 *raw_msg = '\0'; … … 398 404 } 399 405 strncat(raw_msg, line, s - line); 400 irc_send_msg_raw (iu, type, dst, tags, raw_msg);406 irc_send_msg_raw_tags(iu, type, dst, tags, raw_msg); 401 407 } 402 if (ts) 408 if (ts) { 403 409 g_free(tags); 410 } 404 411 line = s + 1; 405 412 } … … 408 415 } 409 416 410 void irc_send_msg_raw(irc_user_t *iu, const char *type, const char *dst, const char* tags, const char *msg) 417 void irc_send_msg_raw(irc_user_t *iu, const char *type, const char *dst, const char *msg) 418 { 419 irc_send_msg_raw_tags(iu, type, dst, NULL, msg); 420 } 421 422 void irc_send_msg_raw_tags(irc_user_t *iu, const char *type, const char *dst, const char* tags, const char *msg) 411 423 { 412 424 irc_write(iu->irc, "%s%s:%s!%s@%s %s %s :%s",
Note: See TracChangeset
for help on using the changeset viewer.