ayttm-commits
[Top][All Lists]
Advanced

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

[Ayttm-commits] CVS: ayttm/modules/msn2 msn.C,1.67,1.68


From: Colin Leroy <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/modules/msn2 msn.C,1.67,1.68
Date: Sat, 15 Mar 2003 07:58:08 -0500

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

Modified Files:
        msn.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: msn.C
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/msn2/msn.C,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- msn.C       7 Mar 2003 13:58:22 -0000       1.67
+++ msn.C       15 Mar 2003 12:57:57 -0000      1.68
@@ -1,5 +1,5 @@
 /*
- * EveryBuddy
+ * Ayttm
  *
  * Copyright (C) 2003, the Ayttm team
  * 
@@ -131,6 +131,7 @@
 void eb_msn_format_message (message * msg);
 static char *eb_msn_get_color(void) { static char color[]="#aa0000"; return 
color; }
 void close_conn(msnconn *conn);
+void eb_msn_change_group(eb_account * ea, const char *new_group);
 void eb_msn_real_change_group(eb_account * ea, const char *old_group, const 
char *new_group);
 
 LList *eb_msn_get_smileys(void) { return psmileys; }
@@ -918,8 +919,7 @@
      if (ac != NULL) {
         eb_debug(DBG_MSN, "User (%s) not authorized - removing 
account\n",username);
         remove_account(ac);
-     }      
-     msn_add_to_list(mainconn, "BL", username);
+     }
   }
   msn_del_from_llist(waiting_auth_callbacks, (llist_data *)username);    
 }
@@ -1036,6 +1036,28 @@
        return ea;
 }
 
+static void eb_msn_ignore_user(eb_account *ea)
+{
+       if (!ea)
+               return;
+       
+       eb_msn_change_group(ea, _("Ignore"));
+       if (mainconn != NULL) {
+               msn_del_from_list(mainconn, "AL", ea->handle);  
+               msn_add_to_list(mainconn, "BL", ea->handle);
+       }
+}
+
+static void eb_msn_unignore_user(eb_account *ea, const char *new_group)
+{
+       if (!ea)
+               return;
+       eb_msn_change_group(ea, new_group);
+       if (mainconn != NULL) {
+               msn_del_from_list(mainconn, "BL", ea->handle);  
+               msn_add_to_list(mainconn, "AL", ea->handle);
+       }
+}
 
 char **eb_msn_get_status_pixmap( eb_account * account)
 {
@@ -1436,6 +1458,8 @@
        sc->add_user = eb_msn_add_user;
        sc->del_user = eb_msn_del_user;
        sc->new_account = eb_msn_new_account;
+       sc->ignore_user = eb_msn_ignore_user;
+       sc->unignore_user = eb_msn_unignore_user;
        sc->get_status_string = eb_msn_get_status_string;
        sc->get_status_pixmap = eb_msn_get_status_pixmap;
        sc->set_idle = eb_msn_set_idle;
@@ -1563,13 +1587,16 @@
 
   for(existing; existing != NULL && existing->data != NULL; existing = 
existing->next) {
         char *cnt = (char*) existing->data;
-        if (!is_on_list(cnt,info->al)) {
-                eb_debug(DBG_MSN,"adding %s to al\n",cnt);
-            msn_add_to_list(mainconn, "AL", cnt);
-        }
-        if (!is_on_list(cnt,info->fl)) {
-                eb_debug(DBG_MSN,"adding %s to fl\n",cnt);
-            msn_add_to_list(mainconn, "FL", cnt);
+        eb_account *ea = find_account_by_handle(cnt, SERVICE_INFO.protocol_id);
+        if (ea && strcmp(ea->account_contact->group->name, _("Ignore"))) {
+                if (!is_on_list(cnt,info->al)) {
+                        eb_debug(DBG_MSN,"adding %s to al\n",cnt);
+                    msn_add_to_list(mainconn, "AL", cnt);
+                }
+                if (!is_on_list(cnt,info->fl)) {
+                        eb_debug(DBG_MSN,"adding %s to fl\n",cnt);
+                    msn_add_to_list(mainconn, "FL", cnt);
+                }
         }
   }
 





reply via email to

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