diff plugins/gaim-remote/remote.c @ 10395:b4b9dabdd7c7

[gaim-migrate @ 11624] Some whitespace fixes, a compile warning fix, and add a "logout" option to gaim-remote committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 17 Dec 2004 23:30:38 +0000
parents 5976491e07a7
children 3e4ecbdf8d0a
line wrap: on
line diff
--- a/plugins/gaim-remote/remote.c	Fri Dec 17 00:05:32 2004 +0000
+++ b/plugins/gaim-remote/remote.c	Fri Dec 17 23:30:38 2004 +0000
@@ -95,7 +95,7 @@
 		char *who, *what;
 		GaimConversation *c;
 		uri = uri + strlen("aim:goim?");
-		
+
 		if (!(who = strstr(uri, "screenname="))) {
 			return _("No screenname given.");
 		}
@@ -108,7 +108,7 @@
 		}
 		who = g_strdup(str->str);
 		g_string_free(str, TRUE);
-		
+
 		what = strstr(uri, "message=");
 		if (what) {
 			what = what + strlen("message=");
@@ -168,10 +168,10 @@
 		char *room;
 		GHashTable *components;
 		int exch = 5;
-		
+
 		uri = uri + strlen("aim:gochat?");
 		/* spaces are encoded as +'s */
-		
+
 		if (!(room = strstr(uri, "roomname="))) {
 			return _("No roomname given.");
 		}
@@ -194,8 +194,7 @@
 	} else {
 		return _("Invalid AIM URI");
 	}
-	
-	
+
 	return NULL;
 }
 
@@ -305,6 +304,7 @@
 {
 	GaimRemotePacket *p;
 	GError *error = NULL;
+
 	switch (subtype) {
 	case CUI_META_LIST:
 		break;
@@ -416,6 +416,11 @@
 		break;
 
 #endif /* STATUS */
+
+	case CUI_USER_LOGOUT:
+		gaim_connections_disconnect_all();
+		break;
+
 	default:
 		gaim_debug_warning("cui", "Unhandled user subtype %d\n", subtype);
 		break;
@@ -682,10 +687,10 @@
 		case CUI_TYPE_CHAT:
 			chat_handler(ui, subtype, in);
 			break;
-			*/   
+			*/
 		case CUI_TYPE_REMOTE:
 			remote_handler(ui, subtype, in, len);
-			break; 
+			break;
 		default:
 			gaim_debug_warning("cui", "Unhandled type %d\n", type);
 			break;
@@ -724,12 +729,12 @@
 {
 	struct sockaddr_un saddr;
 	gint fd;
-	
+
 	while (gaim_remote_session_exists(gaim_session))
 		gaim_session++;
-	
+
 	gaim_debug_misc("cui", "Session: %d\n", gaim_session);
-	
+
 	if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) != -1) {
 		mode_t m = umask(0177);
 		saddr.sun_family = AF_UNIX;
@@ -742,7 +747,7 @@
 			*error = g_strdup_printf(_("Failed to assign %s to a socket:\n%s"),
 					   saddr.sun_path, strerror(errno));
 			g_log(NULL, G_LOG_LEVEL_CRITICAL,
-			      "Failed to assign %s to a socket (Error: %s)",	
+			      "Failed to assign %s to a socket (Error: %s)",
 			      saddr.sun_path, strerror(errno));
 			umask(m);
 			return -1;