6 Commits

Author SHA1 Message Date
1267655bbe fix tls unsupported issue on windows 2026-09-10 18:23:26 -06:00
5734b14e78 test first start experience 2026-09-10 07:06:25 -06:00
bb3893d36c Fix channel ACTION routing after self-message handling 2026-09-03 09:27:07 -06:00
deepend-tildeclub
fe57449f6c Merge pull request #374 from TehPeGaSuS/fix/weechat-relay-pm-split
Fix private messages splitting into two windows over WeeChat's IRC relay
2026-09-03 08:20:55 -07:00
ThePeGaSuS
c725adaa09 Fix CTCP ACTION not rerouting self-sent /me to correct PM window
Mirrors the PRIVMSG fix: replayed /me messages sent by our own nick
via WeeChat relay backlog were always passed with fromme=FALSE,
so they never got rerouted to the actual PM query window.
2026-09-03 08:51:21 +02:00
ThePeGaSuS
0ba523d071 Fix: private messages split into two windows over WeeChat's IRC relay
When you send a private message, ZoiteChat sometimes gets the same
message echoed back by the server so it can show it in the right
window. Whether it recognizes that echo depended on the server first
confirming a feature called "echo-message" during connection setup.

WeeChat's relay doesn't seem to confirm that feature the way other
servers (or ZNC) do, so ZoiteChat didn't recognize its own echoed
messages and treated them as brand new incoming messages from
yourself, opening a second, separate conversation window instead of
using the one you were already typing in.

This makes ZoiteChat recognize its own message by checking who sent
it, instead of only trusting that feature confirmation. That way,
sent and received messages always end up in the same conversation
window, regardless of how well the server/relay announces its
capabilities.
2026-08-28 20:48:12 +02:00
9 changed files with 2869 additions and 21 deletions

View File

@@ -429,6 +429,8 @@ const struct prefs vars[] =
{"gui_lang", P_OFFINT (hex_gui_lang), TYPE_INT},
{"gui_mode_buttons", P_OFFINT (hex_gui_mode_buttons), TYPE_BOOL},
{"gui_mode_buttons_inline", P_OFFINT (hex_gui_mode_buttons_inline), TYPE_BOOL},
{"gui_onboarding_disable", P_OFFINT (hex_gui_onboarding_disable), TYPE_BOOL},
{"gui_onboarding_pending", P_OFFINT (hex_gui_onboarding_pending), TYPE_BOOL},
{"gui_pane_divider_position", P_OFFINT (hex_gui_pane_divider_position), TYPE_INT},
{"gui_pane_left_size", P_OFFINT (hex_gui_pane_left_size), TYPE_INT},
{"gui_pane_right_size", P_OFFINT (hex_gui_pane_right_size), TYPE_INT},

View File

@@ -126,7 +126,21 @@ ctcp_handle (session *sess, char *to, char *nick, char *ip,
if (ctcp_check (sess, nick, word, word_eol, word[4] + ctcp_offset))
goto generic;
inbound_action (sess, to, nick, ip, msg + 7, FALSE, tags_data->identified, tags_data);
{
gboolean private_fromme = !serv->p_cmp (nick, serv->nick) && !is_channel (serv, to);
if (private_fromme)
{
session *target = find_dialog (serv, to);
if (target)
sess = target;
else if (serv->front_session)
sess = serv->front_session;
}
inbound_action (sess, to, nick, ip, msg + 7, private_fromme, tags_data->identified, tags_data);
}
return;
}

View File

@@ -1368,7 +1368,7 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
{
if (ignore_check (word[1], IG_PRIV))
return;
if (serv->have_echo_message && !serv->p_cmp (nick, serv->nick))
if (!serv->p_cmp (nick, serv->nick))
{
session *target_sess = find_dialog (serv, to);

View File

@@ -191,6 +191,8 @@ struct defaultserver
gboolean ssl;
};
static gboolean servlist_needs_onboarding_flag;
static const struct defaultserver def[] =
{
{"2600net", 0},
@@ -1181,7 +1183,10 @@ servlist_load (void)
fp = zoitechat_fopen_file ("servlist.conf", "r", 0);
if (!fp)
{
servlist_needs_onboarding_flag = TRUE;
return FALSE;
}
while (fgets (buf, sizeof (buf) - 2, fp))
{
@@ -1245,6 +1250,7 @@ servlist_load (void)
net = servlist_net_add (buf + 2, NULL, FALSE);
}
fclose (fp);
servlist_needs_onboarding_flag = (network_list == NULL);
return TRUE;
}
@@ -1253,8 +1259,16 @@ void
servlist_init (void)
{
if (!network_list)
if (!servlist_load ())
{
if (!servlist_load () || !network_list)
servlist_load_defaults ();
}
}
gboolean
servlist_needs_onboarding (void)
{
return servlist_needs_onboarding_flag;
}
/* check if a charset is known by Iconv */
@@ -1395,6 +1409,7 @@ servlist_save (void)
}
fclose (fp);
servlist_needs_onboarding_flag = FALSE;
return TRUE;
}

View File

@@ -93,6 +93,7 @@ extern GSList *network_list;
#define IRC_DEFAULT_CHARSET "UTF-8 (Unicode)"
void servlist_init (void);
gboolean servlist_needs_onboarding (void);
int servlist_save (void);
int servlist_cycle (server *serv);
void servlist_connect (session *sess, ircnet *net, gboolean join);

View File

@@ -134,6 +134,8 @@ struct zoitechatprefs
unsigned int hex_gui_join_dialog;
unsigned int hex_gui_mode_buttons;
unsigned int hex_gui_mode_buttons_inline;
unsigned int hex_gui_onboarding_disable;
unsigned int hex_gui_onboarding_pending;
unsigned int hex_gui_quit_dialog;
/* unsigned int hex_gui_single; */
unsigned int hex_gui_slist_fav;

View File

@@ -91,6 +91,7 @@ zoitechat_gtk_ldflags = []
if host_machine.system() == 'windows'
zoitechat_gtk_sources += 'notifications/notification-windows.c'
zoitechat_gtk_deps += cc.find_library('dwmapi', required: true)
zoitechat_gtk_deps += cc.find_library('winhttp', required: true)
zoitechat_theme_deps += cc.find_library('dwmapi', required: true)
else

File diff suppressed because it is too large Load Diff

View File

@@ -645,6 +645,9 @@ static const char *const proxyuse[] =
static const setting network_settings[] =
{
{ST_HEADER, N_("Startup"), 0, 0, 0, 0},
{ST_TOGGLE, N_("Disable first-run assistant"), P_OFFINTNL(hex_gui_onboarding_disable), 0, 0, 0},
{ST_HEADER, N_("Your Address"), 0, 0, 0, 0},
{ST_ENTRY, N_("Bind to:"), P_OFFSETNL(hex_net_bind_host), 0, 0, sizeof prefs.hex_net_bind_host},
{ST_LABEL, N_("Only useful for computers with multiple addresses.")},