summary refs log tree commit diff stats
path: root/src/fe-gtk
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-gtk')
-rw-r--r--src/fe-gtk/servlistgui.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/fe-gtk/servlistgui.c b/src/fe-gtk/servlistgui.c
index b64cf78c..6ef455fd 100644
--- a/src/fe-gtk/servlistgui.c
+++ b/src/fe-gtk/servlistgui.c
@@ -1570,7 +1570,15 @@ servlist_nick_changed_cb (GtkEntry *entry, gpointer userdata)
 	const gchar *nick1 = gtk_entry_get_text (GTK_ENTRY (entry_nick1));
 	const gchar *nick2 = gtk_entry_get_text (GTK_ENTRY (entry_nick2));
 
-	if (!rfc_casecmp (nick1, nick2))
+	if (!nick1[0] || !nick2[0])
+	{
+		entry = GTK_ENTRY(!nick1[0] ? entry_nick1 : entry_nick2);
+		gtk_entry_set_icon_from_stock (entry, GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_DIALOG_ERROR);
+		gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_SECONDARY,
+		                                 _("You cannot have an empty nick name."));
+		gtk_widget_set_sensitive (connect_btn, FALSE);
+	}
+	else if (!rfc_casecmp (nick1, nick2))
 	{
 		gtk_entry_set_icon_from_stock (entry, GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_DIALOG_ERROR);
 		gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_SECONDARY,