Changeset 9767d03
- 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)
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
dcc.c
rf7cc734 r9767d03 214 214 df->ft->file_name, ipaddr, port, df->ft->file_size); 215 215 216 irc_send_msg_raw(iu, "PRIVMSG", iu->irc->user->nick, cmd , 0);216 irc_send_msg_raw(iu, "PRIVMSG", iu->irc->user->nick, cmd); 217 217 218 218 g_free(cmd); -
irc.h
rf7cc734 r9767d03 343 343 void irc_send_whois(irc_user_t *iu); 344 344 void irc_send_who(irc_t *irc, GSList *l, const char *channel); 345 void irc_send_msg(irc_user_t *iu, const char *type, const char *dst, const char *msg, const char *prefix , time_t ts);346 void irc_send_msg_raw(irc_user_t *iu, const char *type, const char *dst, const char * tags, const char*msg);345 void irc_send_msg(irc_user_t *iu, const char *type, const char *dst, const char *msg, const char *prefix); 346 void irc_send_msg_raw(irc_user_t *iu, const char *type, const char *dst, const char *msg); 347 347 void irc_send_msg_f(irc_user_t *iu, const char *type, const char *dst, const char *format, ...) G_GNUC_PRINTF(4, 5); 348 348 void irc_send_nick(irc_user_t *iu, const char *new_nick); … … 352 352 void irc_send_cap(irc_t *irc, char *subcommand, char *body); 353 353 void irc_send_away_notify(irc_user_t *iu); 354 355 G_GNUC_INTERNAL void irc_send_msg_ts(irc_user_t *iu, const char *type, const char *dst, const char *msg, const char *prefix, time_t ts); 356 G_GNUC_INTERNAL void irc_send_msg_raw_tags(irc_user_t *iu, const char *type, const char *dst, const char* tags, const char *msg); 354 357 355 358 /* irc_user.c */ … … 365 368 char *set_eval_timezone(struct set *set, char *value); 366 369 char *irc_format_timestamp(irc_t *irc, time_t msg_ts); 367 char *irc_format_servertime(irc_t *irc, time_t msg_ts);370 G_GNUC_INTERNAL char *irc_format_servertime(irc_t *irc, time_t msg_ts); 368 371 char *set_eval_self_messages(struct set *set, char *value); 369 372 -
irc_channel.c
rf7cc734 r9767d03 500 500 va_end(params); 501 501 502 irc_send_msg(ic->irc->root, "PRIVMSG", ic->name, text, NULL , 0);502 irc_send_msg(ic->irc->root, "PRIVMSG", ic->name, text, NULL); 503 503 g_free(text); 504 504 } -
irc_commands.c
rf7cc734 r9767d03 524 524 for lag checks, so try to support that. */ 525 525 if (nick_cmp(NULL, cmd[1], irc->user->nick) == 0) { 526 irc_send_msg(irc->user, "NOTICE", irc->user->nick, cmd[2], NULL , 0);526 irc_send_msg(irc->user, "NOTICE", irc->user->nick, cmd[2], NULL); 527 527 } else if ((iu = irc_user_by_name(irc, cmd[1]))) { 528 528 iu->f->privmsg(iu, cmd[2]); … … 825 825 int i; 826 826 827 irc_send_msg_raw(irc->root, "NOTICE", irc->user->nick, "COMPLETIONS OK" , 0);827 irc_send_msg_raw(irc->root, "NOTICE", irc->user->nick, "COMPLETIONS OK"); 828 828 829 829 for (i = 0; root_commands[i].command; i++) { … … 839 839 } 840 840 841 irc_send_msg_raw(irc->root, "NOTICE", irc->user->nick, "COMPLETIONS END" , 0);841 irc_send_msg_raw(irc->root, "NOTICE", irc->user->nick, "COMPLETIONS END"); 842 842 } 843 843 -
irc_im.c
rf7cc734 r9767d03 305 305 306 306 wrapped = word_wrap(msg, IRC_WORD_WRAP); 307 irc_send_msg (src_iu, message_type, dst, wrapped, prefix, sent_at);307 irc_send_msg_ts(src_iu, message_type, dst, wrapped, prefix, sent_at); 308 308 g_free(wrapped); 309 309 … … 347 347 g_string_append_c(msg, '\001'); 348 348 349 irc_send_msg((irc_user_t *) bu->ui_data, "NOTICE", irc->user->nick, msg->str, NULL , 0);349 irc_send_msg((irc_user_t *) bu->ui_data, "NOTICE", irc->user->nick, msg->str, NULL); 350 350 351 351 g_string_free(msg, TRUE); … … 707 707 708 708 wrapped = word_wrap(msg, IRC_WORD_WRAP); 709 irc_send_msg (iu, "PRIVMSG", ic->name, wrapped, ts, sent_at);709 irc_send_msg_ts(iu, "PRIVMSG", ic->name, wrapped, ts, sent_at); 710 710 g_free(ts); 711 711 g_free(wrapped); … … 819 819 irc_send_msg_f(iu, "PRIVMSG", irc->user->nick, "<< \002BitlBee\002 - Invitation to chatroom %s >>", name); 820 820 if (msg) { 821 irc_send_msg(iu, "PRIVMSG", irc->user->nick, msg, NULL , 0);821 irc_send_msg(iu, "PRIVMSG", irc->user->nick, msg, NULL); 822 822 } 823 823 if (chan) { -
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", -
irc_user.c
rf7cc734 r9767d03 261 261 static gboolean self_privmsg(irc_user_t *iu, const char *msg) 262 262 { 263 irc_send_msg(iu, "PRIVMSG", iu->nick, msg, NULL , 0);263 irc_send_msg(iu, "PRIVMSG", iu->nick, msg, NULL); 264 264 265 265 return TRUE;
Note: See TracChangeset
for help on using the changeset viewer.