Ignore:
Timestamp:
2015-04-10T17:10:40Z (9 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
cfeadc3
Parents:
d80822c
git-author:
dequis <dx@…> (09-03-15 08:26:16)
git-committer:
dequis <dx@…> (10-04-15 17:10:40)
Message:

msn: remove unsupported commands, OIMs and dead code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/msn_util.c

    rd80822c rd550358  
    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)) ||
     
    375322}
    376323
    377 void msn_msgq_purge(struct im_connection *ic, GSList **list)
    378 {
    379         struct msn_message *m;
    380         GString *ret;
    381         GSList *l;
    382         int n = 0;
    383 
    384         l = *list;
    385         if (l == NULL) {
    386                 return;
    387         }
    388 
    389         m = l->data;
    390         ret = g_string_sized_new(1024);
    391         g_string_printf(ret, "Warning: Cleaning up MSN (switchboard) connection with unsent "
    392                         "messages to %s:", m->who ? m->who : "unknown recipient");
    393 
    394         while (l) {
    395                 m = l->data;
    396 
    397                 if (strncmp(m->text, "\r\r\r", 3) != 0) {
    398                         g_string_append_printf(ret, "\n%s", m->text);
    399                         n++;
    400                 }
    401 
    402                 g_free(m->who);
    403                 g_free(m->text);
    404                 g_free(m);
    405 
    406                 l = l->next;
    407         }
    408         g_slist_free(*list);
    409         *list = NULL;
    410 
    411         if (n > 0) {
    412                 imcb_log(ic, "%s", ret->str);
    413         }
    414         g_string_free(ret, TRUE);
    415 }
    416 
    417324/* Copied and heavily modified from http://tmsnc.sourceforge.net/chl.c */
    418325char *msn_p11_challenge(char *challenge)
Note: See TracChangeset for help on using the changeset viewer.