diff libpurple/protocols/sametime/sametime.c @ 31534:a8cc50c2279f

Remove trailing whitespace
author Richard Laager <rlaager@wiktel.com>
date Tue, 04 Jan 2011 06:55:30 +0000
parents 1cdae196aac8
children 3ef5e744589c
line wrap: on
line diff
--- a/libpurple/protocols/sametime/sametime.c	Tue Jan 04 06:42:45 2011 +0000
+++ b/libpurple/protocols/sametime/sametime.c	Tue Jan 04 06:55:30 2011 +0000
@@ -317,12 +317,12 @@
 /** resolves a mwSession from a PurpleConnection */
 static struct mwSession *gc_to_session(PurpleConnection *gc) {
   struct mwPurplePluginData *pd;
-  
+
   g_return_val_if_fail(gc != NULL, NULL);
-  
+
   pd = gc->proto_data;
   g_return_val_if_fail(pd != NULL, NULL);
-  
+
   return pd->session;
 }
 
@@ -355,7 +355,7 @@
 
   while(avail) {
     ret = write(pd->socket, circ->outptr, avail);
-    
+
     if(ret <= 0)
       break;
 
@@ -438,7 +438,7 @@
   g_return_if_fail(pd != NULL);
 
   gc = pd->gc;
-  
+
   if(pd->outpa) {
     purple_input_remove(pd->outpa);
     pd->outpa = 0;
@@ -448,7 +448,7 @@
     close(pd->socket);
     pd->socket = 0;
   }
-  
+
   if(gc->inpa) {
     purple_input_remove(gc->inpa);
     gc->inpa = 0;
@@ -489,7 +489,7 @@
 
   PurpleConnection *gc;
   PurpleAccount *acct;
-    
+
   struct mwPurplePluginData *pd;
   guint32 idle;
   guint stat;
@@ -507,7 +507,7 @@
   if(idle) {
     guint32 idle_len;       /*< how long a client has been idle */
     guint32 ugly_idle_len;  /*< how long a broken client has been idle */
-    
+
     DEBUG_INFO("%s has idle value 0x%x\n", NSTR(id), idle);
 
     idle_len = time(NULL) - idle;
@@ -518,7 +518,7 @@
 	else
 		ugly_idle_len = (ugly_idle_len - idle) / 1000;
 
-    /* 
+    /*
        what's the deal here? Well, good clients are smart enough to
        publish their idle time by using an attribute to indicate that
        they went idle at some time UTC, in seconds since epoch. Bad
@@ -554,16 +554,16 @@
   case mwStatus_IDLE:
     if(! idle) idle = -1;
     break;
-    
+
   case mwStatus_AWAY:
     status = MW_STATE_AWAY;
     break;
-    
+
   case mwStatus_BUSY:
     status = MW_STATE_BUSY;
     break;
   }
-  
+
   /* NAB group members */
   if(aware->group) {
     PurpleGroup *group;
@@ -593,7 +593,7 @@
 
     purple_blist_node_set_int(bnode, BUDDY_KEY_TYPE, mwSametimeUser_NORMAL);
   }
-  
+
   if(aware->online) {
     purple_prpl_got_user_status(acct, id, status, NULL);
     purple_prpl_got_user_idle(acct, id, !!idle, (time_t) idle);
@@ -628,17 +628,17 @@
     returns that list. */
 static struct mwAwareList *
 list_ensure(struct mwPurplePluginData *pd, PurpleGroup *group) {
-  
+
   struct mwAwareList *list;
-  
+
   g_return_val_if_fail(pd != NULL, NULL);
   g_return_val_if_fail(group != NULL, NULL);
-  
+
   list = g_hash_table_lookup(pd->group_list_map, group);
   if(! list) {
     list = mwAwareList_new(pd->srvc_aware, &mw_aware_list_handler);
     mwAwareList_setClientData(list, pd->gc, NULL);
-    
+
     mwAwareList_watchAttributes(list,
 				mwAttribute_AV_PREFS_SET,
 				mwAttribute_MICROPHONE,
@@ -650,7 +650,7 @@
     g_hash_table_replace(pd->group_list_map, group, list);
     g_hash_table_insert(pd->group_list_map, list, group);
   }
-  
+
   return list;
 }
 
@@ -689,7 +689,7 @@
     /* if it's a normal group with none of our people in it, skip it */
     if(gtype == mwSametimeGroup_NORMAL && !purple_group_on_account(grp, acct))
       continue;
-    
+
     /* if the group has an owner and we're not it, skip it */
     owner = purple_blist_node_get_string(gn, GROUP_KEY_OWNER);
     if(owner && strcmp(owner, purple_account_get_username(acct)))
@@ -740,7 +740,7 @@
 	}
       }
     }
-  }  
+  }
 }
 
 
@@ -842,7 +842,7 @@
 
   blist_schedule(pd);
 
-  g_list_free(add);  
+  g_list_free(add);
 }
 
 
@@ -866,11 +866,11 @@
   buddy = purple_find_buddy_in_group(acct, id, group);
   if(! buddy) {
     buddy = purple_buddy_new(acct, id, alias);
-  
+
     purple_blist_add_buddy(buddy, NULL, group, NULL);
     buddy_add(pd, buddy);
   }
-  
+
   purple_blist_alias_buddy(buddy, alias);
   purple_blist_server_alias_buddy(buddy, name);
   purple_blist_node_set_string((PurpleBlistNode *) buddy, BUDDY_KEY_NAME, name);
@@ -888,7 +888,7 @@
   struct mwAwareList *list;
   const char *n;
   GList *add;
-  
+
   n = purple_blist_node_get_string((PurpleBlistNode *) group, GROUP_KEY_NAME);
   if(! n) n = purple_group_get_name(group);
 
@@ -965,7 +965,7 @@
     purple_blist_node_set_string(gn, GROUP_KEY_OWNER, owner);
     group_add(gc->proto_data, group);
   }
-  
+
   return group;
 }
 
@@ -1025,7 +1025,7 @@
       PurpleBuddy *gb = (PurpleBuddy *) bn;
 
       if(! PURPLE_BLIST_NODE_IS_BUDDY(bn)) continue;
-      
+
       if(purple_buddy_get_account(gb) == acct) {
 	DEBUG_INFO("clearing %s from group\n", NSTR(purple_buddy_get_name(gb)));
 	prune = g_list_prepend(prune, gb);
@@ -1057,7 +1057,7 @@
 
   PurpleAccount *acct;
   PurpleBlistNode *gn, *cn, *bn;
-  
+
   GHashTable *stusers;
   GList *prune = NULL;
   GList *ul, *utl;
@@ -1070,7 +1070,7 @@
   g_return_if_fail(acct != NULL);
 
   stusers = g_hash_table_new(g_str_hash, g_str_equal);
-  
+
   /* build a hash table for quick lookup while pruning the group
      contents */
   utl = mwSametimeGroup_getUsers(stgroup);
@@ -1205,7 +1205,7 @@
 	 of our members in it, so don't fully delete it */
       del = FALSE;
     }
-    
+
     group_clear(g_prune->data, acct, del);
     g_prune = g_list_delete_link(g_prune, g_prune);
   }
@@ -1280,7 +1280,7 @@
   conv = mwServiceIm_getConversation(pd->srvc_im, &who);
 
   convo_features(conv);
-    
+
   if(mwConversation_isClosed(conv))
     mwConversation_open(conv);
 }
@@ -1391,7 +1391,7 @@
       }
     }
   }
-  
+
   if(add_buds) {
     purple_account_add_buddies(acct, add_buds);
     g_list_free(add_buds);
@@ -1412,7 +1412,7 @@
 
   /* grab the buddy list from the server */
   unit = mwStorageUnit_new(mwStore_AWARE_LIST);
-  mwServiceStorage_load(pd->srvc_store, unit, fetch_blist_cb, pd, NULL); 
+  mwServiceStorage_load(pd->srvc_store, unit, fetch_blist_cb, pd, NULL);
 
   /* find all the NAB groups and subscribe to them */
   for(l = purple_blist_get_root(); l;
@@ -1492,7 +1492,7 @@
   acct = purple_connection_get_account(pd->gc);
   status = purple_account_get_active_status(acct);
   mw_prpl_set_status(acct, status);
-  
+
   /* start watching for new conversations */
   purple_signal_connect(purple_conversations_get_handle(),
 		      "conversation-created", pd,
@@ -1502,7 +1502,7 @@
   purple_signal_connect(purple_blist_get_handle(),
 		      "blist-node-extended-menu", pd,
 		      PURPLE_CALLBACK(blist_node_menu_cb), pd);
-  
+
   /* use our services to do neat things */
   services_starting(pd);
 }
@@ -1733,7 +1733,7 @@
   int ret = 0, err = 0;
 
   g_return_if_fail(pd != NULL);
- 
+
   ret = read_recv(pd->session, pd->socket);
 
   /* normal operation ends here */
@@ -1826,7 +1826,7 @@
   PurpleBuddy *buddy;
   char *who = from->user_id;
   char *msg;
-  
+
   pd = mwSession_getClientData(s);
   acct = purple_connection_get_account(pd->gc);
   conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, who, acct);
@@ -1886,7 +1886,7 @@
 static void mw_conf_invited(struct mwConference *conf,
 			    struct mwLoginInfo *inviter,
 			    const char *invitation) {
-  
+
   struct mwServiceConference *srvc;
   struct mwSession *session;
   struct mwPurplePluginData *pd;
@@ -1943,7 +1943,7 @@
   struct mwServiceConference *srvc = pd->srvc_conf;
   struct mwConference *conf = NULL;
   GList *l, *ll;
-  
+
   ll = mwServiceConference_getConferences(srvc);
   for(l = ll; l; l = l->next) {
     struct mwConference *c = l->data;
@@ -1955,7 +1955,7 @@
     }
   }
   g_list_free(ll);
-  
+
   return conf;
 }
 
@@ -2042,7 +2042,7 @@
 
 static void mw_conf_peer_parted(struct mwConference *conf,
 				struct mwLoginInfo *peer) {
-  
+
   struct mwServiceConference *srvc;
   struct mwSession *session;
   struct mwPurplePluginData *pd;
@@ -2067,7 +2067,7 @@
 
 static void mw_conf_text(struct mwConference *conf,
 			 struct mwLoginInfo *who, const char *text) {
-  
+
   struct mwServiceConference *srvc;
   struct mwSession *session;
   struct mwPurplePluginData *pd;
@@ -2141,7 +2141,7 @@
 
 static void ft_incoming_init(PurpleXfer *xfer) {
   /* incoming transfer accepted */
-  
+
   /* - accept the mwFileTransfer
      - open/create the local FILE "wb"
      - stick the FILE's fp in xfer->dest_fp
@@ -2222,7 +2222,7 @@
 
   rem = mwFileTransfer_getRemaining(ft);
   if(rem < MW_FT_LEN) o.len = rem;
-  
+
   if(fread(buf, (size_t) o.len, 1, fp)) {
 
     /* calculate progress and display it */
@@ -2261,7 +2261,7 @@
   if(purple_xfer_get_type(xfer) == PURPLE_XFER_SEND) {
     xfer->dest_fp = g_fopen(xfer->local_filename, "rb");
     ft_send(ft, xfer->dest_fp);
-  }  
+  }
 }
 
 
@@ -2454,7 +2454,7 @@
     m->data = g_strdup(data);
     m->clear = g_free;
     break;
-    
+
   case mwImSend_TYPING:
   default:
     m->data = (gpointer) data;
@@ -2470,22 +2470,22 @@
   PurpleConversation *gconv;
   char *tmp, *text;
   struct mwIdBlock *idb;
-  
+
   idb = mwConversation_getTarget(conv);
-  
+
   tmp = mwError(err);
   text = g_strconcat(_("Unable to send message: "), tmp, NULL);
-  
+
   gconv = convo_get_gconv(conv);
   if(gconv && !purple_conv_present_error(idb->user, gconv->account, text)) {
-    
+
     g_free(text);
     text = g_strdup_printf(_("Unable to send message to %s:"),
 			   (idb->user)? idb->user: "(unknown)");
     purple_notify_error(purple_account_get_connection(gconv->account),
 		      NULL, text, tmp);
   }
-  
+
   g_free(tmp);
   g_free(text);
 }
@@ -2494,7 +2494,7 @@
 static void convo_queue_send(struct mwConversation *conv) {
   struct convo_data *cd;
   GList *l;
-  
+
   cd = mwConversation_getClientData(conv);
 
   for(l = cd->queue; l; l = g_list_delete_link(l, l)) {
@@ -2580,7 +2580,7 @@
   cd = mwConversation_getClientData(conv);
   if(cd) {
     convo_queue_send(conv);
-  
+
     if(! convo_get_gconv(conv)) {
       mwConversation_free(conv);
       return;
@@ -2594,7 +2594,7 @@
     PurpleBuddy *buddy;
     struct mwLoginInfo *info;
     info = mwConversation_getTargetInfo(conv);
-    
+
     buddy = purple_find_buddy(acct, info->user_id);
     if(buddy) {
       purple_blist_node_set_int((PurpleBlistNode *) buddy,
@@ -2741,7 +2741,7 @@
 
   /* don't want the contained string to ever be NULL */
   str = g_string_new("");
-  
+
   doc = purple_mime_document_parse(data);
 
   /* handle all the MIME parts */
@@ -2755,7 +2755,7 @@
 
     if(! type) {
       ; /* feh */
-      
+
     } else if(purple_str_has_prefix(type, "image")) {
       /* put images into the image store */
 
@@ -2766,7 +2766,7 @@
 
       /* obtain and unencode the data */
       purple_mime_part_get_data_decoded(part, &d_dat, &d_len);
-      
+
       /* look up the content id */
       cid = (char *) purple_mime_part_get_field(part, "Content-ID");
       cid = make_cid(cid);
@@ -2779,7 +2779,7 @@
 
       /* recall the image for dereferencing later */
       images = g_list_append(images, GINT_TO_POINTER(img));
-      
+
     } else if(purple_str_has_prefix(type, "text")) {
 
       /* concatenate all the text parts together */
@@ -2790,7 +2790,7 @@
       g_string_append(str, (const char *)data);
       g_free(data);
     }
-  }  
+  }
 
   purple_mime_document_free(doc);
 
@@ -2839,7 +2839,7 @@
   im_recv_html(conv, pd, str->str);
 
   g_string_free(str, TRUE);
-  
+
   /* clean up the cid table */
   g_hash_table_destroy(img_by_cid);
 
@@ -2905,7 +2905,7 @@
   pd = mwSession_getClientData(session);
 
   idb = mwConversation_getTarget(conv);
-  
+
   ht = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_free);
   g_hash_table_insert(ht, CHAT_KEY_CREATOR, g_strdup(idb->user));
   g_hash_table_insert(ht, CHAT_KEY_NAME, g_strdup(name));
@@ -3246,7 +3246,7 @@
 
 static const char* mw_prpl_list_emblem(PurpleBuddy *b)
 {
-  if(buddy_is_external(b)) 
+  if(buddy_is_external(b))
     return "external";
 
   return NULL;
@@ -3292,22 +3292,22 @@
 static char *user_supports_text(struct mwServiceAware *srvc, const char *who) {
   const char *feat[] = {NULL, NULL, NULL, NULL, NULL};
   const char **f = feat;
-  
+
   if(user_supports(srvc, who, mwAttribute_AV_PREFS_SET)) {
     gboolean mic, speak, video;
-    
+
     mic = user_supports(srvc, who, mwAttribute_MICROPHONE);
     speak = user_supports(srvc, who, mwAttribute_SPEAKERS);
     video = user_supports(srvc, who, mwAttribute_VIDEO_CAMERA);
-    
+
     if(mic) *f++ = _("Microphone");
     if(speak) *f++ = _("Speakers");
     if(video) *f++ = _("Video Camera");
   }
-  
+
   if(user_supports(srvc, who, mwAttribute_FILE_TRANSFER))
     *f++ = _("File Transfer");
-  
+
   return (*feat)? g_strjoinv(", ", (char **)feat): NULL;
   /* jenni loves siege */
 }
@@ -3431,7 +3431,7 @@
   const char *msgA;
   const char *msgB;
   char *msg1;
-  
+
   g_return_if_fail(buddy != NULL);
 
   acct = purple_buddy_get_account(buddy);
@@ -3439,18 +3439,18 @@
 
   gc = purple_account_get_connection(acct);
   g_return_if_fail(gc != NULL);
-  
+
   fields = purple_request_fields_new();
 
   g = purple_request_field_group_new(NULL);
   purple_request_fields_add_group(fields, g);
-  
+
   f = purple_request_field_string_new(CHAT_KEY_TOPIC, _("Topic"), NULL, FALSE);
   purple_request_field_group_add_field(g, f);
 
   f = purple_request_field_string_new(CHAT_KEY_INVITE, _("Message"), msg, FALSE);
   purple_request_field_group_add_field(g, f);
-  
+
   msgA = _("Create conference with user");
   msgB = _("Please enter a topic for the new conference, and an invitation"
 	   " message to be sent to %s");
@@ -3477,7 +3477,7 @@
   PurpleRequestField *f;
   GList *l;
   const char *msg;
-  
+
   f = purple_request_fields_get_field(fields, CHAT_KEY_INVITE);
   msg = purple_request_field_string_get_value(f);
 
@@ -3486,7 +3486,7 @@
 
   if(l) {
     gpointer d = purple_request_field_list_get_data(f, l->data);
-    
+
     if(GPOINTER_TO_INT(d) == 0x01) {
       blist_menu_conf_create(buddy, msg);
 
@@ -3500,7 +3500,7 @@
 
 static void blist_menu_conf_list(PurpleBuddy *buddy,
 				 GList *confs) {
-  
+
   PurpleRequestFields *fields;
   PurpleRequestFieldGroup *g;
   PurpleRequestField *f;
@@ -3519,7 +3519,7 @@
   g_return_if_fail(gc != NULL);
 
   fields = purple_request_fields_new();
-  
+
   g = purple_request_field_group_new(NULL);
   purple_request_fields_add_group(fields, g);
 
@@ -3532,10 +3532,10 @@
   purple_request_field_list_add_icon(f, _("Create New Conference..."),
 			      NULL, GINT_TO_POINTER(0x01));
   purple_request_field_group_add_field(g, f);
-  
+
   f = purple_request_field_string_new(CHAT_KEY_INVITE, "Message", NULL, FALSE);
   purple_request_field_group_add_field(g, f);
-  
+
   msgA = _("Invite user to a conference");
   msgB = _("Select a conference from the list below to send an invite to"
 	   " user %s. Select \"Create New Conference\" if you'd like to"
@@ -3655,12 +3655,12 @@
 static GList *mw_prpl_chat_info(PurpleConnection *gc) {
   GList *l = NULL;
   struct proto_chat_entry *pce;
-  
+
   pce = g_new0(struct proto_chat_entry, 1);
   pce->label = _("Topic:");
   pce->identifier = CHAT_KEY_TOPIC;
   l = g_list_append(l, pce);
-  
+
   return l;
 }
 
@@ -3708,13 +3708,13 @@
   PurpleAccount *acct;
   const char *msgA;
   char *msg;
-  
+
   acct = purple_connection_get_account(gc);
   msgA = _("No host or IP address has been configured for the"
 	  " Meanwhile account %s. Please enter one below to"
 	  " continue logging in.");
   msg = g_strdup_printf(msgA, NSTR(purple_account_get_username(acct)));
-  
+
   purple_request_input(gc, _("Meanwhile Connection Setup"),
 		     _("No Sametime Community Server Specified"), msg,
 		     MW_PLUGIN_DEFAULT_HOST, FALSE, FALSE, NULL,
@@ -3748,7 +3748,7 @@
     *host++ = '\0';
     purple_account_set_string(account, MW_KEY_HOST, host);
     purple_account_set_username(account, user);
-    
+
   } else {
     host = (char *) purple_account_get_string(account, MW_KEY_HOST,
 					    MW_PLUGIN_DEFAULT_HOST);
@@ -3787,10 +3787,10 @@
     DEBUG_INFO("client id: 0x%04x\n", client);
     DEBUG_INFO("client major: 0x%04x\n", major);
     DEBUG_INFO("client minor: 0x%04x\n", minor);
-  
+
     mwSession_setProperty(pd->session, mwSession_CLIENT_TYPE_ID,
 			  GUINT_TO_POINTER(client), NULL);
-    
+
     mwSession_setProperty(pd->session, mwSession_CLIENT_VER_MAJOR,
 			  GUINT_TO_POINTER(major), NULL);
 
@@ -3928,7 +3928,7 @@
 				     (const char **) &end, &attr)) {
     char *id;
     PurpleStoredImage *img = NULL;
-    
+
     gsize len = (start - tmp);
 
     /* append the in-between-tags text */
@@ -3971,7 +3971,7 @@
       /* append the modified tag */
       g_string_append_printf(str, "<img src=\"cid:%s\">", cid);
       g_free(cid);
-      
+
     } else {
       /* append the literal image tag, since we couldn't find a
 	 relative imgstore object */
@@ -4045,7 +4045,7 @@
       tmp = im_mime_convert(gc, conv, message);
       ret = mwConversation_send(conv, mwImSend_MIME, tmp);
       g_free(tmp);
-      
+
     } else if(mwConversation_supports(conv, mwImSend_HTML)) {
       /* send an HTML message */
 
@@ -4063,7 +4063,7 @@
       ret = mwConversation_send(conv, mwImSend_PLAIN, tmp);
       g_free(tmp);
     }
-    
+
     return !ret;
 
   } else {
@@ -4084,7 +4084,7 @@
 static unsigned int mw_prpl_send_typing(PurpleConnection *gc,
 					const char *name,
 					PurpleTypingState state) {
-  
+
   struct mwPurplePluginData *pd;
   struct mwIdBlock who = { (char *) name, NULL };
   struct mwConversation *conv;
@@ -4100,14 +4100,14 @@
 
   if(mwConversation_isOpen(conv)) {
     mwConversation_send(conv, mwImSend_TYPING, t);
-    
+
   } else if((state == PURPLE_TYPING) || (state == PURPLE_TYPED)) {
     /* only open a channel for sending typing notification, not for
        when typing has stopped. There's no point in re-opening a
        channel just to tell someone that this side isn't typing. */
-    
+
     convo_queue(conv, mwImSend_TYPING, t);
-    
+
     if(! mwConversation_isPending(conv)) {
       mwConversation_open(conv);
     }
@@ -4121,7 +4121,7 @@
   switch(type) {
   case mwLogin_LIB:
     return "Lotus Binary Library";
-    
+
   case mwLogin_JAVA_WEB:
     return "Lotus Java Client Applet";
 
@@ -4214,11 +4214,11 @@
 		tmp = g_strdup_printf(_("Unknown (0x%04x)<br>"), type);
 
 	  purple_notify_user_info_add_pair(user_info, _("Last Known Client"), tmp);
-		
+
 	  g_free(tmp);
     }
   }
-  
+
   tmp = user_supports_text(pd->srvc_aware, who);
   if(tmp) {
 	purple_notify_user_info_add_pair(user_info, _("Supports"), tmp);
@@ -4244,65 +4244,65 @@
   purple_notify_userinfo(gc, who, user_info, NULL, NULL);
   purple_notify_user_info_destroy(user_info);
 }
- 
- 
+
+
 static void mw_prpl_set_status(PurpleAccount *acct, PurpleStatus *status) {
   PurpleConnection *gc;
   const char *state;
   char *message = NULL;
   struct mwSession *session;
   struct mwUserStatus stat;
-  
+
   g_return_if_fail(acct != NULL);
   gc = purple_account_get_connection(acct);
-  
+
   state = purple_status_get_id(status);
-  
+
   DEBUG_INFO("Set status to %s\n", purple_status_get_name(status));
-  
+
   g_return_if_fail(gc != NULL);
-  
+
   session = gc_to_session(gc);
   g_return_if_fail(session != NULL);
-  
+
   /* get a working copy of the current status */
   mwUserStatus_clone(&stat, mwSession_getUserStatus(session));
-  
+
   /* determine the state */
   if(! strcmp(state, MW_STATE_ACTIVE)) {
     stat.status = mwStatus_ACTIVE;
-    
+
   } else if(! strcmp(state, MW_STATE_AWAY)) {
     stat.status = mwStatus_AWAY;
-    
+
   } else if(! strcmp(state, MW_STATE_BUSY)) {
     stat.status = mwStatus_BUSY;
   }
-  
+
   /* determine the message */
   message = (char *) purple_status_get_attr_string(status, MW_STATE_MESSAGE);
-  
+
   if(message) {
     /* all the possible non-NULL values of message up to this point
        are const, so we don't need to free them */
     message = purple_markup_strip_html(message);
   }
-  
+
   /* out with the old */
   g_free(stat.desc);
-  
+
   /* in with the new */
   stat.desc = (char *) message;
-  
+
   mwSession_setUserStatus(session, &stat);
   mwUserStatus_clear(&stat);
 }
 
- 
+
 static void mw_prpl_set_idle(PurpleConnection *gc, int t) {
   struct mwSession *session;
   struct mwUserStatus stat;
- 
+
 
   session = gc_to_session(gc);
   g_return_if_fail(session != NULL);
@@ -4347,7 +4347,7 @@
 static void notify_add(PurpleConnection *gc, GList *row, void *user_data) {
   BuddyAddData *data = user_data;
   const char *group_name = NULL;
-  
+
   if (data && data->group) {
     group_name = purple_group_get_name(data->group);
   }
@@ -4392,13 +4392,13 @@
   for(l = result->matches; l; l = l->next) {
     struct mwResolveMatch *match = l->data;
     GList *row = NULL;
-        
+
     DEBUG_INFO("multi resolve: %s, %s\n",
 	       NSTR(match->id), NSTR(match->name));
 
     if(!match->id || !match->name)
       continue;
-    
+
     row = g_list_append(row, g_strdup(match->name));
     row = g_list_append(row, g_strdup(match->id));
     purple_notify_searchresults_row_add(sres, row);
@@ -4440,7 +4440,7 @@
   if(!code && res && res->matches) {
     if(!res->matches->next) {
       struct mwResolveMatch *match = res->matches->data;
-      
+
       /* only one? that might be the right one! */
       if(strcmp(res->name, match->id)) {
 	/* uh oh, the single result isn't identical to the search
@@ -4448,7 +4448,7 @@
 	   the user meant to add */
 	purple_blist_remove_buddy(buddy);
 	multi_resolved_query(res, gc, data);
-	
+
       } else {
 
 	/* same person, set the server alias */
@@ -4463,13 +4463,13 @@
 
         g_free(data);
       }
-      
+
     } else {
       /* prompt user if more than one match was returned */
       purple_blist_remove_buddy(buddy);
       multi_resolved_query(res, gc, data);
     }
-    
+
     return;
   }
 
@@ -4628,7 +4628,7 @@
 
 static void privacy_fill(struct mwPrivacyInfo *priv,
 			 GSList *members) {
-  
+
   struct mwUserItem *u;
   guint count;
 
@@ -4690,7 +4690,7 @@
     DEBUG_INFO("PURPLE_PRIVACY_DENY_ALL\n");
     privacy.deny = FALSE;
     break;
-    
+
   default:
     DEBUG_INFO("acct->perm_deny is 0x%x\n", acct->perm_deny);
     return;
@@ -4745,12 +4745,12 @@
 
   struct mwPurplePluginData *pd;
   char *c, *t;
-  
+
   pd = gc->proto_data;
 
   c = g_hash_table_lookup(components, CHAT_KEY_NAME);
   t = g_hash_table_lookup(components, CHAT_KEY_TOPIC);
-  
+
   if(g_hash_table_lookup(components, CHAT_KEY_IS_PLACE)) {
     /* use place service */
     struct mwServicePlace *srvc;
@@ -4759,7 +4759,7 @@
     srvc = pd->srvc_place;
     place = mwPlace_new(srvc, c, t);
     mwPlace_open(place);
-     
+
   } else {
     /* use conference service */
     struct mwServiceConference *srvc;
@@ -4771,7 +4771,7 @@
     if(conf) {
       DEBUG_INFO("accepting conference invitation\n");
       mwConference_accept(conf);
-      
+
     } else {
       DEBUG_INFO("creating new conference\n");
       conf = mwConference_new(srvc, t);
@@ -4787,7 +4787,7 @@
   struct mwPurplePluginData *pd;
   struct mwServiceConference *srvc;
   char *c;
-  
+
   pd = gc->proto_data;
   srvc = pd->srvc_conf;
 
@@ -5046,7 +5046,7 @@
 
   srvc = pd->srvc_aware;
   g_return_val_if_fail(srvc != NULL, FALSE);
-  
+
   acct = purple_connection_get_account(gc);
   g_return_val_if_fail(acct != NULL, FALSE);
 
@@ -5097,7 +5097,7 @@
     char *tmp = strrchr(filename, G_DIR_SEPARATOR);
     if(tmp++) filename = tmp;
   }
-  
+
   ft = mwFileTransfer_new(srvc, &idb, NULL, filename, filesize);
 
   purple_xfer_ref(xfer);
@@ -5110,7 +5110,7 @@
 
 static void ft_outgoing_cancel(PurpleXfer *xfer) {
   struct mwFileTransfer *ft = xfer->data;
-  
+
   DEBUG_INFO("ft_outgoing_cancel called\n");
 
   if(ft) mwFileTransfer_cancel(ft);
@@ -5210,7 +5210,7 @@
   .offline_message           = NULL,
   .whiteboard_prpl_ops       = NULL,
   .send_raw                  = NULL,
-  .struct_size               = sizeof(PurplePluginProtocolInfo)		
+  .struct_size               = sizeof(PurplePluginProtocolInfo)
 };
 
 
@@ -5220,10 +5220,10 @@
   PurplePluginPref *pref;
 
   frame = purple_plugin_pref_frame_new();
-  
+
   pref = purple_plugin_pref_new_with_label(_("Remotely Stored Buddy List"));
   purple_plugin_pref_frame_add(frame, pref);
-  
+
 
   pref = purple_plugin_pref_new_with_name(MW_PRPL_OPT_BLIST_ACTION);
   purple_plugin_pref_set_label(pref, _("Buddy List Storage Mode"));
@@ -5344,7 +5344,7 @@
 
 static void remote_group_multi_cleanup(gpointer ignore,
 				       PurpleRequestFields *fields) {
-  
+
   PurpleRequestField *f;
   GList *l;
 
@@ -5376,7 +5376,7 @@
 
   gc = pd->gc;
   acct = purple_connection_get_account(gc);
-  
+
   /* collision checking */
   group = purple_find_group(name);
   if(group) {
@@ -5497,7 +5497,7 @@
 
   gc = pd->gc;
   g_return_if_fail(gc != NULL);
-  
+
   if(!code && results) {
     res = results->data;
 
@@ -5537,7 +5537,7 @@
 
   query = g_list_prepend(NULL, (char *) name);
   flags = mwResolveFlag_FIRST | mwResolveFlag_GROUPS;
-  
+
   req = mwServiceResolve_resolve(srvc, query, flags, remote_group_resolved,
 				 NULL, NULL);
   g_list_free(query);
@@ -5599,7 +5599,7 @@
 
     if(!match->id || !match->name)
       continue;
-    
+
     row = g_list_append(row, g_strdup(match->name));
     row = g_list_append(row, g_strdup(match->id));
     purple_notify_searchresults_row_add(sres, row);
@@ -5659,7 +5659,7 @@
 
   pd = gc->proto_data;
   srvc = pd->srvc_resolve;
-  
+
   query = g_list_prepend(NULL, (char *) name);
   flags = mwResolveFlag_FIRST | mwResolveFlag_USERS;
 
@@ -5837,7 +5837,7 @@
      get caught here */
   log_handler[0] = g_log_set_handler(G_LOG_DOMAIN, logflags,
 				     mw_log_handler, NULL);
-  
+
   /* redirect meanwhile's logging to purple's */
   log_handler[1] = g_log_set_handler("meanwhile", logflags,
 				     mw_log_handler, NULL);