Have join dialog suggest #hexchat for freenode users

This commit is contained in:
TingPing 2013-07-27 00:22:57 -04:00
parent 93cfa353e7
commit 3bd2143d9a
1 changed files with 8 additions and 0 deletions

View File

@ -34,6 +34,7 @@
#include "../common/hexchat.h" #include "../common/hexchat.h"
#include "../common/hexchatc.h" #include "../common/hexchatc.h"
#include "../common/server.h" #include "../common/server.h"
#include "../common/servlist.h"
#include "../common/fe.h" #include "../common/fe.h"
#include "fe-gtk.h" #include "fe-gtk.h"
#include "chanlist.h" #include "chanlist.h"
@ -242,6 +243,13 @@ joind_show_dialog (server *serv)
g_signal_connect (G_OBJECT (okbutton1), "clicked", g_signal_connect (G_OBJECT (okbutton1), "clicked",
G_CALLBACK (joind_ok_cb), serv); G_CALLBACK (joind_ok_cb), serv);
if (serv->network)
if (g_ascii_strcasecmp(((ircnet*)serv->network)->name, "freenode") == 0)
{
gtk_entry_set_text (GTK_ENTRY (entry1), "#hexchat");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(radiobutton2), TRUE);
}
gtk_widget_grab_focus (okbutton1); gtk_widget_grab_focus (okbutton1);
gtk_widget_show_all (dialog1); gtk_widget_show_all (dialog1);
} }