Changeset c54bb11
- Timestamp:
- 2015-12-06T02:34:12Z (9 years ago)
- Branches:
- master
- Children:
- 459dec8
- Parents:
- f4396c4
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
irc.h
rf4396c4 rc54bb11 72 72 CAP_EXTENDED_JOIN = (1 << 2), 73 73 CAP_AWAY_NOTIFY = (1 << 3), 74 CAP_USERHOST_IN_NAMES = (1 << 4), 74 75 } irc_cap_flag_t; 75 76 -
irc_cap.c
rf4396c4 rc54bb11 42 42 {"extended-join", CAP_EXTENDED_JOIN}, 43 43 {"away-notify", CAP_AWAY_NOTIFY}, 44 {"userhost-in-names", CAP_USERHOST_IN_NAMES}, 44 45 {NULL}, 45 46 }; -
irc_send.c
rf4396c4 rc54bb11 208 208 GSList *l; 209 209 GString *namelist = g_string_sized_new(IRC_NAMES_LEN); 210 gboolean uhnames = (ic->irc->caps & CAP_USERHOST_IN_NAMES); 210 211 211 212 /* RFCs say there is no error reply allowed on NAMES, so when the … … 217 218 char prefix; 218 219 220 if (uhnames) { 221 extra_len += strlen(iu->user) + strlen(iu->host) + 2; 222 } 223 219 224 if (namelist->len + extra_len > IRC_NAMES_LEN - 4) { 220 225 irc_send_num(ic->irc, 353, "= %s :%s", ic->name, namelist->str); … … 226 231 } 227 232 228 g_string_append(namelist, iu->nick); 229 g_string_append_c(namelist, ' '); 233 if (uhnames) { 234 g_string_append_printf(namelist, "%s!%s@%s ", iu->nick, iu->user, iu->host); 235 } else { 236 g_string_append(namelist, iu->nick); 237 g_string_append_c(namelist, ' '); 238 } 230 239 } 231 240
Note: See TracChangeset
for help on using the changeset viewer.