summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/hexchat.h1
-rw-r--r--src/common/modes.c6
-rw-r--r--src/common/proto-irc.c8
-rw-r--r--src/common/server.c1
-rw-r--r--src/common/util.c11
-rw-r--r--src/common/util.h1
6 files changed, 12 insertions, 16 deletions
diff --git a/src/common/hexchat.h b/src/common/hexchat.h
index e234c976..f734472d 100644
--- a/src/common/hexchat.h
+++ b/src/common/hexchat.h
@@ -572,7 +572,6 @@ typedef struct server
 	unsigned int have_namesx:1;		/* 005 tokens NAMESX and UHNAMES */
 	unsigned int have_uhnames:1;
 	unsigned int have_whox:1;		/* have undernet's WHOX features */
-	unsigned int have_capab:1;		/* supports CAPAB (005 tells us) */
 	unsigned int have_idmsg:1;		/* freenode's IDENTIFY-MSG */
 	unsigned int have_sasl:1;		/* SASL capability */
 	unsigned int have_except:1;	/* ban exemptions +e */
diff --git a/src/common/modes.c b/src/common/modes.c
index 7326b6fe..32b5a3fa 100644
--- a/src/common/modes.c
+++ b/src/common/modes.c
@@ -813,12 +813,6 @@ inbound_005 (server * serv, char *word[])
 		} else if (strcmp (word[w], "WHOX") == 0)
 		{
 			serv->have_whox = TRUE;
-		} else if (strcmp (word[w], "CAPAB") == 0)
-		{
-			serv->have_capab = TRUE;
-									/* 12345678901234567890 */
-			tcp_send_len (serv, "CAPAB IDENTIFY-MSG\r\n", 20);
-			/* now wait for numeric 290 */	
 		} else if (strcmp (word[w], "EXCEPTS") == 0)
 		{
 #ifndef WIN32
diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c
index 13147016..790e3242 100644
--- a/src/common/proto-irc.c
+++ b/src/common/proto-irc.c
@@ -518,14 +518,6 @@ process_numeric (session * sess, int n,
 		}
 		goto def;
 
-	case 290:	/* CAPAB reply */
-		if (strstr (word_eol[1], "IDENTIFY-MSG"))
-		{
-			serv->have_idmsg = TRUE;
-			break;
-		}
-		goto def;
-
 	case 301:
 		inbound_away (serv, word[4],
 						(word_eol[5][0] == ':') ? word_eol[5] + 1 : word_eol[5]);
diff --git a/src/common/server.c b/src/common/server.c
index 8ad1d6ca..1ace2a48 100644
--- a/src/common/server.c
+++ b/src/common/server.c
@@ -1886,7 +1886,6 @@ server_set_defaults (server *serv)
 	serv->have_namesx = FALSE;
 	serv->have_uhnames = FALSE;
 	serv->have_whox = FALSE;
-	serv->have_capab = FALSE;
 	serv->have_idmsg = FALSE;
 	serv->have_sasl = FALSE;
 	serv->have_except = FALSE;
diff --git a/src/common/util.c b/src/common/util.c
index 2319f75e..0f04d9ca 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -1877,6 +1877,17 @@ hextray_mode ()
 #endif
 }
 
+int
+unity_mode ()
+{
+#ifdef G_OS_UNIX
+	const char *env = g_getenv("XDG_CURRENT_DESKTOP");
+	if (env && strcmp (env, "Unity") == 0)
+		return 1;
+#endif
+	return 0;
+}
+
 /* Routine for listing subfolders of a given folder. ALWAYS free correctly after use, e.g.
 void display_list (GSList *list)
 {
diff --git a/src/common/util.h b/src/common/util.h
index 8114cbc7..601d9e50 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -60,6 +60,7 @@ void safe_strcpy (char *dest, const char *src, int bytes_left);
 void canonalize_key (char *key);
 int portable_mode ();
 int hextray_mode ();
+int unity_mode ();
 GSList *get_subdirs (const char *path);
 char *encode_sasl_pass (char *user, char *pass);