Ignore:
Timestamp:
2015-03-15T14:41:47Z (9 years ago)
Author:
dequis <dx@…>
Children:
e2bf725
Parents:
6e74911
git-author:
dequis <dx@…> (09-03-15 08:26:16)
git-committer:
dequis <dx@…> (15-03-15 14:41:47)
Message:

msn: remove unsupported commands, OIMs and dead code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/msn_util.c

    r6e74911 rc5a1502  
    5555
    5656        *groupid = '\0';
    57 #if 0
    58         if (group) {
    59                 int i;
    60                 for (i = 0; i < md->groupcount; i++) {
    61                         if (g_strcasecmp(md->grouplist[i], group) == 0) {
    62                                 g_snprintf(groupid, sizeof(groupid), " %d", i);
    63                                 break;
    64                         }
    65                 }
    66 
    67                 if (*groupid == '\0') {
    68                         /* Have to create this group, it doesn't exist yet. */
    69                         struct msn_groupadd *ga;
    70                         GSList *l;
    71 
    72                         for (l = md->grpq; l; l = l->next) {
    73                                 ga = l->data;
    74                                 if (g_strcasecmp(ga->group, group) == 0) {
    75                                         break;
    76                                 }
    77                         }
    78 
    79                         ga = g_new0(struct msn_groupadd, 1);
    80                         ga->who = g_strdup(who);
    81                         ga->group = g_strdup(group);
    82                         md->grpq = g_slist_prepend(md->grpq, ga);
    83 
    84                         if (l == NULL) {
    85                                 char groupname[strlen(group) + 1];
    86                                 strcpy(groupname, group);
    87                                 http_encode(groupname);
    88                                 g_snprintf(buf, sizeof(buf), "ADG %d %s %d\r\n", ++md->trId, groupname, 0);
    89                                 return msn_write(ic, buf, strlen(buf));
    90                         } else {
    91                                 /* This can happen if the user's doing lots of adds to a
    92                                    new group at once; we're still waiting for the server
    93                                    to confirm group creation. */
    94                                 return 1;
    95                         }
    96                 }
    97         }
    98 #endif
    9957
    10058        if (!((bu = bee_user_by_handle(ic->bee, ic, who)) ||
     
    13290
    13391        *groupid = '\0';
    134 #if 0
    135         if (group) {
    136                 int i;
    137                 for (i = 0; i < md->groupcount; i++) {
    138                         if (g_strcasecmp(md->grouplist[i], group) == 0) {
    139                                 g_snprintf(groupid, sizeof(groupid), " %d", i);
    140                                 break;
    141                         }
    142                 }
    143         }
    144 #endif
    14592
    14693        if (!(bu = bee_user_by_handle(ic->bee, ic, who)) ||
     
    369316}
    370317
    371 void msn_msgq_purge(struct im_connection *ic, GSList **list)
    372 {
    373         struct msn_message *m;
    374         GString *ret;
    375         GSList *l;
    376         int n = 0;
    377 
    378         l = *list;
    379         if (l == NULL) {
    380                 return;
    381         }
    382 
    383         m = l->data;
    384         ret = g_string_sized_new(1024);
    385         g_string_printf(ret, "Warning: Cleaning up MSN (switchboard) connection with unsent "
    386                         "messages to %s:", m->who ? m->who : "unknown recipient");
    387 
    388         while (l) {
    389                 m = l->data;
    390 
    391                 if (strncmp(m->text, "\r\r\r", 3) != 0) {
    392                         g_string_append_printf(ret, "\n%s", m->text);
    393                         n++;
    394                 }
    395 
    396                 g_free(m->who);
    397                 g_free(m->text);
    398                 g_free(m);
    399 
    400                 l = l->next;
    401         }
    402         g_slist_free(*list);
    403         *list = NULL;
    404 
    405         if (n > 0) {
    406                 imcb_log(ic, "%s", ret->str);
    407         }
    408         g_string_free(ret, TRUE);
    409 }
    410 
    411318/* Copied and heavily modified from http://tmsnc.sourceforge.net/chl.c */
    412319char *msn_p11_challenge(char *challenge)
Note: See TracChangeset for help on using the changeset viewer.