ayttm-commits
[Top][All Lists]
Advanced

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

[Ayttm-commits] CVS: ayttm/modules/aim-toc aim-toc.c,1.18,1.19


From: Colin Leroy <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/modules/aim-toc aim-toc.c,1.18,1.19
Date: Thu, 30 Jan 2003 04:39:06 -0500

Update of /cvsroot/ayttm/ayttm/modules/aim-toc
In directory subversions:/tmp/cvs-serv30946/modules/aim-toc

Modified Files:
        aim-toc.c 
Log Message:
change_group() callback


Index: aim-toc.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/aim-toc/aim-toc.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- aim-toc.c   30 Jan 2003 08:23:19 -0000      1.18
+++ aim-toc.c   30 Jan 2003 09:39:02 -0000      1.19
@@ -61,7 +61,7 @@
 #include "pixmaps/aim_away.xpm"
 
 #define DBG_TOC do_aim_debug
-static int do_aim_debug = 1;
+int do_aim_debug = 1;
 
 
/*************************************************************************************
  *                             Begin Module Code
@@ -1021,6 +1021,30 @@
        toc_set_idle( alad->conn, idle );
 }
 
+static void eb_aim_change_group(eb_account * ea, char *new_group)
+{
+       char str[2048];
+       struct eb_aim_local_account_data * alad;
+       LList * node;
+       
+       g_snprintf(str, 2048, "g %s\nb %s", new_group, ea->handle);
+
+       if( eb_services[ea->service_id].protocol_id != SERVICE_INFO.protocol_id 
)
+               return;
+
+       for( node = accounts; node; node=node->next )
+       {
+               eb_local_account * ela = node->data;
+               if( ela && ela->connected && ela->service_id == ea->service_id)
+               {
+                       alad = ela->protocol_local_account_data;
+                       toc_remove_buddy(alad->conn, ea->handle, 
ea->account_contact->group->name );
+                       toc_add_buddy(alad->conn, ea->handle, new_group);
+               }
+               
+       }
+}
+
 static void eb_aim_get_info( eb_local_account * from, eb_account * account_to )
 {
        struct eb_aim_local_account_data * alad;
@@ -1137,5 +1161,6 @@
        sc->get_color = eb_toc_get_color;
        sc->get_smileys = eb_default_smileys;
        
+       sc->change_group = eb_aim_change_group;
        return sc;
 }





reply via email to

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