Changeset d797fb4
- Timestamp:
- 2015-09-11T02:31:10Z (9 years ago)
- Branches:
- master
- Children:
- 355e2ad
- Parents:
- b57fed0
- git-author:
- dequis <dx@…> (18-08-15 05:03:39)
- git-committer:
- dequis <dx@…> (11-09-15 02:31:10)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
irc_commands.c
rb57fed0 rd797fb4 127 127 } 128 128 129 /* this one looks suspiciously similar to cap ls, 130 * but cap-3.2 will make them very different */ 131 static void irc_cmd_cap_list(irc_t *irc) { 132 int i; 133 gboolean first = TRUE; 134 GString *str = g_string_sized_new(256); 135 136 for (i = 0; supported_caps[i].name; i++) { 137 if (irc->caps & supported_caps[i].flag) { 138 if (!first) { 139 g_string_append_c(str, ' '); 140 } 141 first = FALSE; 142 143 g_string_append(str, supported_caps[i].name); 144 } 145 } 146 147 irc_send_cap(irc, "LIST", str->str); 148 149 g_string_free(str, TRUE); 150 } 151 129 152 static void irc_cmd_cap(irc_t *irc, char **cmd) 130 153 { … … 138 161 139 162 } else if (g_strcasecmp(cmd[1], "LIST") == 0) { 140 irc_ send_cap(irc, "LIST", "");163 irc_cmd_cap_list(irc); 141 164 142 165 } else if (g_strcasecmp(cmd[1], "REQ") == 0) {
Note: See TracChangeset
for help on using the changeset viewer.