diff -up xchat-gnome-0.26.1/plugins/net-monitor/net-monitor.c.recent-nm xchat-gnome-0.26.1/plugins/net-monitor/net-monitor.c
--- xchat-gnome-0.26.1/plugins/net-monitor/net-monitor.c.recent-nm	2009-03-15 09:08:06.000000000 -0500
+++ xchat-gnome-0.26.1/plugins/net-monitor/net-monitor.c	2011-03-25 18:10:33.621834647 -0500
@@ -23,7 +23,6 @@
  */
 
 #include <config.h>
-#define DBUS_API_SUBJECT_TO_CHANGE
 #include <dbus/dbus.h>
 #include <dbus/dbus-glib.h>
 #include <dbus/dbus-glib-lowlevel.h>
@@ -54,13 +53,18 @@ typedef enum
 
 typedef enum
 {
-	NM_STATE_UNKNOWN = 0,
-	NM_STATE_ASLEEP,
-	NM_STATE_CONFIGURE_AP,
-	NM_STATE_CONFIGURE_DEV,
-	NM_STATE_CONFIGURE_IP,
-	NM_STATE_CONNECTED,
-	NM_STATE_DISCONNECTED,
+	NM_STATE_UNKNOWN          = 0,
+	NM_OLD_STATE_ASLEEP       = 1,
+	NM_OLD_STATE_CONNECTING   = 4,
+	NM_OLD_STATE_CONNECTED    = 5,
+	NM_OLD_STATE_DISCONNECTED = 6,
+	NM_STATE_ASLEEP           = 10,
+	NM_STATE_DISCONNECTED     = 20,
+	NM_STATE_DISCONNECTING    = 30,
+	NM_STATE_CONNECTING       = 40,
+	NM_STATE_CONNECTED_LOCAL  = 50,
+	NM_STATE_CONNECTED_SITE   = 60,
+	NM_STATE_CONNECTED_GLOBAL = 70
 } NetworkManagerState;
 
 enum {
@@ -180,50 +184,6 @@ set_network_mode (NetworkStatus status)
 	}
 }
 
-static NetworkStatus
-check_device_state (const char *path)
-{
-	DBusMessage     *message, *reply;
-	DBusMessageIter  iter;
-	DBusError        error;
-	NetworkStatus    network_mode;
-
-	message = dbus_message_new_method_call (NM_SERVICE, path, NM_INTERFACE, "getLinkActive");
-	if (message == NULL) {
-		g_warning ("Net Monitor: Couldn't allocate dbus message : %s: %s\n", error.name, error.message);
-		/* just guess that we're up */
-		return NETWORK_UP;
-	}
-
-	dbus_error_init (&error);
-	reply = dbus_connection_send_with_reply_and_block (bus, message, -1, &error);
-
-	if (dbus_error_is_set (&error)) {
-		g_warning ("Net Monitor: Error retrieving device state: %s: %s\n", error.name, error.message);
-		network_mode = NETWORK_UP;
-	} else {
-		dbus_message_iter_init (reply, &iter);
-
-		if (dbus_message_iter_get_arg_type (&iter) == DBUS_TYPE_BOOLEAN) {
-			dbus_bool_t active;
-
-			dbus_message_iter_get_basic (&iter, &active);
-			network_mode = active ? NETWORK_UP : NETWORK_DOWN;
-		} else {
-			g_warning ("Net Monitor: got bad reply from NetworkManager\n");
-			network_mode = NETWORK_UP;
-		}
-	}
-
-	if (reply)
-		dbus_message_unref (reply);
-
-	if (message)
-		dbus_message_unref (message);
-
-	return network_mode;
-}
-
 static void
 determine_network_status ()
 {
@@ -232,7 +192,7 @@ determine_network_status ()
 	DBusError        error;
 	NetworkStatus    network_mode = NETWORK_DOWN;
 
-	message = dbus_message_new_method_call (NM_SERVICE, NM_OBJECT_PATH, NM_INTERFACE, "getDevices");
+	message = dbus_message_new_method_call (NM_SERVICE, NM_OBJECT_PATH, NM_INTERFACE, "state");
 	if (message == NULL) {
 		g_warning ("Net Monitor: Couldn't allocate dbus message : %s: %s\n", error.name, error.message);
 		/* just guess that we're up */
@@ -248,24 +208,15 @@ determine_network_status ()
 		network_mode = NETWORK_UP;
 	} else {
 		dbus_message_iter_init (reply, &iter);
-		if (dbus_message_iter_get_arg_type (&iter) == DBUS_TYPE_ARRAY) {
-			DBusMessageIter child;
-
-			dbus_message_iter_recurse (&iter, &child);
-
-			while (dbus_message_iter_get_arg_type (&child) != DBUS_TYPE_INVALID) {
-				const char *path;
-				gboolean state;
-
-				/* Check the state of this individual device.  If any one
-				 * device is active, the network is up */
-				dbus_message_iter_get_basic (&child, &path);
-				state = check_device_state (path);
-				if (state == NETWORK_UP)
-					network_mode = NETWORK_UP;
+		if (dbus_message_iter_get_arg_type (&iter) == DBUS_TYPE_UINT32) {
+			dbus_uint32_t state;
 
-				dbus_message_iter_next (&child);
-			}
+			dbus_message_iter_get_basic (&iter, &state);
+			if (state == NM_OLD_STATE_CONNECTED ||
+			    state == NM_STATE_CONNECTED_LOCAL ||
+			    state == NM_STATE_CONNECTED_SITE ||
+			    state == NM_STATE_CONNECTED_GLOBAL)
+				network_mode = NETWORK_UP;
 		} else {
 			g_warning ("Net Monitor: got bad reply from NetworkManager\n");
 			network_mode = NETWORK_UP;
@@ -284,16 +235,12 @@ determine_network_status ()
 static DBusHandlerResult
 filter_func (DBusConnection *connection, DBusMessage *message, void *data)
 {
-	if (dbus_message_is_signal (message, NM_INTERFACE, "DeviceNoLongerActive")) {
+	if (dbus_message_is_signal (message, NM_INTERFACE, "StateChanged") ||
+	    dbus_message_is_signal (message, NM_INTERFACE, "StateChange")) {
 		determine_network_status ();
 		return DBUS_HANDLER_RESULT_HANDLED;
 	}
 
-	if (dbus_message_is_signal (message, NM_INTERFACE, "DeviceNowActive")) {
-		set_network_mode (NETWORK_UP);
-		return DBUS_HANDLER_RESULT_HANDLED;
-	}
-
 	return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 }
 
