ayttm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ayttm-commits] CVS: ayttm/src offline_queue_mgmt.c,1.4,1.5 status.c,1.


From: Colin Leroy <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/src offline_queue_mgmt.c,1.4,1.5 status.c,1.50,1.51
Date: Sat, 15 Mar 2003 07:58:08 -0500

Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv20979/src

Modified Files:
        offline_queue_mgmt.c status.c 
Log Message:
- src/offline_queue_mgmt.c
Handle ignore and unignore
- src/status.c
Better connected check
- modules/msn2/msn.C
Add and remove from BL on ignore/unignore events




Index: offline_queue_mgmt.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/offline_queue_mgmt.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- offline_queue_mgmt.c        5 Mar 2003 17:41:42 -0000       1.4
+++ offline_queue_mgmt.c        15 Mar 2003 12:57:57 -0000      1.5
@@ -1,5 +1,30 @@
+/*
+ * Ayttm
+ *
+ * Copyright (C) 2003, the Ayttm team
+ * 
+ * Ayttm is derivative of Everybuddy
+ * Copyright (C) 1999-2002, Torrey Searle <address@hidden>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
 #include <stdio.h>
 #include <string.h>
+#include "intl.h"
 #include "account.h"
 #include "contact.h"
 #include "globals.h"
@@ -62,6 +87,11 @@
        FILE *queue, *temp;
        char buff[NAME_MAX], queue_name[NAME_MAX], temp_name[NAME_MAX];
        char **tokens = NULL;
+
+       if (!ela->connected)
+               return 0;
+       
+       printf("CONNECTED on %s !\n",get_service_name(ela->service_id));
        
        /* flush groups, too */
        group_mgmt_flush(ela);
@@ -108,12 +138,17 @@
                        if (ea && action == MGMT_ADD && CAN(ea, add_user)) {
                                RUN_SERVICE(ea)->add_user(ea);
                        }
-                       if (ea && action == MGMT_MOV && CAN(ea, change_group)) {
+                       if (ea && action == MGMT_MOV) {
                                char realgrp[NAME_MAX];
                                /* this is "a bit" ugly :-( */
                                
strcpy(realgrp,ea->account_contact->group->name);
                                
strcpy(ea->account_contact->group->name,oldgroup);
-                               RUN_SERVICE(ea)->change_group(ea, newgroup);
+                               if (!strcmp(newgroup, _("Ignore")) && CAN(ea, 
ignore_user))
+                                       RUN_SERVICE(ea)->ignore_user(ea);
+                               else if (!strcmp(oldgroup, _("Ignore")) && 
CAN(ea, unignore_user))
+                                       RUN_SERVICE(ea)->unignore_user(ea, 
newgroup);
+                               else if (CAN(ea, change_group))
+                                       RUN_SERVICE(ea)->change_group(ea, 
newgroup);
                                strcpy(ea->account_contact->group->name, 
realgrp);
                        }
                        

Index: status.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/status.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- status.c    7 Mar 2003 16:08:00 -0000       1.50
+++ status.c    15 Mar 2003 12:57:57 -0000      1.51
@@ -550,11 +550,8 @@
                        eb_set_active_menu_status(s->ela->status_menu, 
new_state);
        }
        eb_debug(DBG_CORE, "%s set to state %d.\n", 
eb_services[s->ela->service_id].name, s->status );
-       if (s->ela->connected) {
-               printf("CONNECTED on %s 
!\n",get_service_name(s->ela->service_id));
-               /* in about 10 seconds try to flush contact mgmt queue */
-               eb_timeout_add(10000, (GtkFunction)contact_mgmt_flush, 
(gpointer)s->ela);
-       }
+       /* in about 10 seconds try to flush contact mgmt queue */
+       eb_timeout_add(10000, (GtkFunction)contact_mgmt_flush, 
(gpointer)s->ela);
 
        set_menu_sensitivity();
 }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]