4 Commits

Author SHA1 Message Date
deepend-tildeclub
62672ade04 Merge pull request #285 from ZoiteChat/no_proxy_option
Add -noproxy to /server
2026-06-10 09:05:39 -06:00
b22e1c1ccc Add -noproxy to /server 2026-06-10 08:47:52 -06:00
deepend-tildeclub
1b8e60c26d Merge pull request #284 from ZoiteChat/windows-taskbar-improvement
Limit Win32 taskbar workaround to size state changes
2026-06-10 08:20:33 -06:00
035dfdd332 Limit Win32 taskbar workaround to size state changes 2026-06-09 14:02:41 -06:00
3 changed files with 53 additions and 29 deletions

View File

@@ -3462,28 +3462,45 @@ cmd_server (struct session *sess, char *tbuf, char *word[], char *word_eol[])
int use_ssl = FALSE;
#endif
int is_url = TRUE;
int no_proxy = FALSE;
server *serv = sess->server;
ircnet *net = NULL;
while (TRUE)
{
#ifdef USE_OPENSSL
/* BitchX uses -ssl, mIRC uses -e, let's support both */
if (g_strcmp0 (word[2], "-ssl") == 0 || g_strcmp0 (word[2], "-e") == 0)
{
use_ssl = TRUE;
offset++; /* args move up by 1 word */
}
else if (g_strcmp0 (word[2], "-ssl-noverify") == 0)
{
use_ssl = TRUE;
use_ssl_noverify = TRUE;
offset++; /* args move up by 1 word */
}
else if (g_strcmp0 (word[2], "-insecure") == 0)
{
use_ssl = FALSE;
offset++; /* args move up by 1 word */
}
if (g_strcmp0 (word[2 + offset], "-ssl") == 0 || g_strcmp0 (word[2 + offset], "-e") == 0)
{
use_ssl = TRUE;
use_ssl_noverify = FALSE;
offset++;
}
else if (g_strcmp0 (word[2 + offset], "-ssl-noverify") == 0)
{
use_ssl = TRUE;
use_ssl_noverify = TRUE;
offset++;
}
else if (g_strcmp0 (word[2 + offset], "-insecure") == 0)
{
use_ssl = FALSE;
use_ssl_noverify = FALSE;
offset++;
}
else
#endif
if (g_strcmp0 (word[2 + offset], "-noproxy") == 0)
{
no_proxy = TRUE;
offset++;
}
else
{
break;
}
}
serv->dont_use_proxy = no_proxy;
if (!parse_irc_url (word[2 + offset], &server_name, &port, &channel, &key, &use_ssl))
{
@@ -3584,10 +3601,18 @@ cmd_servchan (struct session *sess, char *tbuf, char *word[],
{
int offset = 0;
while (TRUE)
{
#ifdef USE_OPENSSL
if (g_strcmp0 (word[2], "-ssl") == 0 || g_strcmp0 (word[2], "-ssl-noverify") == 0 || g_strcmp0 (word[2], "-insecure") == 0)
offset++;
if (g_strcmp0 (word[2 + offset], "-ssl") == 0 || g_strcmp0 (word[2 + offset], "-ssl-noverify") == 0 || g_strcmp0 (word[2 + offset], "-insecure") == 0)
offset++;
else
#endif
if (g_strcmp0 (word[2 + offset], "-noproxy") == 0)
offset++;
else
break;
}
if (*word[4 + offset])
{
@@ -4119,17 +4144,17 @@ const struct commands xc_cmds[] = {
{"SEND", cmd_send, 0, 0, 1, N_("SEND <nick> [<file>]")},
#ifdef USE_OPENSSL
{"SERVCHAN", cmd_servchan, 0, 0, 1,
N_("SERVCHAN [-insecure|-ssl|-ssl-noverify] <host> <port> <channel>, connects and joins a channel using ssl unless otherwise specified")},
N_("SERVCHAN [-noproxy] [-insecure|-ssl|-ssl-noverify] <host> <port> <channel>, connects and joins a channel using ssl unless otherwise specified")},
#else
{"SERVCHAN", cmd_servchan, 0, 0, 1,
N_("SERVCHAN <host> <port> <channel>, connects and joins a channel")},
N_("SERVCHAN [-noproxy] <host> <port> <channel>, connects and joins a channel")},
#endif
#ifdef USE_OPENSSL
{"SERVER", cmd_server, 0, 0, 1,
N_("SERVER [-insecure|-ssl|-ssl-noverify] <host> [<port>] [<password>], connects to a server using ssl unless otherwise specified, the default port is 6697 for ssl connections and 6667 for insecure connections")},
N_("SERVER [-noproxy] [-insecure|-ssl|-ssl-noverify] <host> [<port>] [<password>], connects to a server using ssl unless otherwise specified, the default port is 6697 for ssl connections and 6667 for insecure connections")},
#else
{"SERVER", cmd_server, 0, 0, 1,
N_("SERVER <host> [<port>] [<password>], connects to a server, the default port is 6667")},
N_("SERVER [-noproxy] <host> [<port>] [<password>], connects to a server, the default port is 6667")},
#endif
{"SET", cmd_set, 0, 0, 1, N_("SET [-e] [-off|-on] [-quiet] <variable> [<value>]")},
{"SETCURSOR", cmd_setcursor, 0, 0, 1, N_("SETCURSOR [-|+]<position>, reposition the cursor in the inputbox")},

View File

@@ -1003,7 +1003,9 @@ mg_windowstate_cb (GtkWindow *wid, GdkEventWindowState *event, gpointer userdata
menu_set_fullscreen (current_sess->gui, prefs.hex_gui_win_fullscreen);
#ifdef G_OS_WIN32
mg_win32_allow_autohide_taskbar (wid, event);
if (event->changed_mask &
(GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN))
mg_win32_allow_autohide_taskbar (wid, event);
#endif
return FALSE;

View File

@@ -855,7 +855,6 @@ tray_toggle_visibility (gboolean force_hide)
static int maximized;
static int fullscreen;
GtkWindow *win;
WinStatus status;
if (!tray_backend_active)
return FALSE;
@@ -871,9 +870,7 @@ tray_toggle_visibility (gboolean force_hide)
if (!win)
return FALSE;
status = tray_get_window_status ();
if (force_hide || status != WS_HIDDEN)
if (force_hide || gtk_widget_get_visible (GTK_WIDGET (win)))
{
if (prefs.hex_gui_tray_away)
zoitechat_command (ph, "ALLSERV AWAY");
@@ -893,8 +890,8 @@ tray_toggle_visibility (gboolean force_hide)
gtk_window_maximize (win);
if (fullscreen)
gtk_window_fullscreen (win);
gtk_window_deiconify (win);
gtk_widget_show (GTK_WIDGET (win));
gtk_window_deiconify (win);
gtk_window_present (win);
}