mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-09-24 16:37:12 +00:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dee61e29a2 | ||
|
|
bb3893d36c | ||
|
|
fe57449f6c | ||
|
|
c725adaa09 | ||
|
|
0ba523d071 |
+15
-1
@@ -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))
|
if (ctcp_check (sess, nick, word, word_eol, word[4] + ctcp_offset))
|
||||||
goto generic;
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1368,7 +1368,7 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
|
|||||||
{
|
{
|
||||||
if (ignore_check (word[1], IG_PRIV))
|
if (ignore_check (word[1], IG_PRIV))
|
||||||
return;
|
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);
|
session *target_sess = find_dialog (serv, to);
|
||||||
|
|
||||||
|
|||||||
+22
-3
@@ -1058,6 +1058,25 @@ mg_input_format_append (GString *summary, const char *text)
|
|||||||
g_string_append (summary, text);
|
g_string_append (summary, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mg_input_format_color_value (char *buffer, gsize buffer_len, const char *label, gint color_index)
|
||||||
|
{
|
||||||
|
guint16 red;
|
||||||
|
guint16 green;
|
||||||
|
guint16 blue;
|
||||||
|
|
||||||
|
if (theme_get_mirc_color_rgb16 ((unsigned int) color_index, &red, &green, &blue))
|
||||||
|
{
|
||||||
|
g_snprintf (buffer, buffer_len,
|
||||||
|
"%s <b>%02d</b> <span foreground=\"#%02x%02x%02x\">■</span>",
|
||||||
|
label, color_index, (guint) (red >> 8), (guint) (green >> 8),
|
||||||
|
(guint) (blue >> 8));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_snprintf (buffer, buffer_len, "%s <b>%02d</b>", label, color_index);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
mg_input_format_update (GtkEntry *entry)
|
mg_input_format_update (GtkEntry *entry)
|
||||||
{
|
{
|
||||||
@@ -1065,7 +1084,7 @@ mg_input_format_update (GtkEntry *entry)
|
|||||||
GtkWidget *format_label;
|
GtkWidget *format_label;
|
||||||
MgInputFormatState state;
|
MgInputFormatState state;
|
||||||
GString *summary;
|
GString *summary;
|
||||||
char color[48];
|
char color[96];
|
||||||
char *markup;
|
char *markup;
|
||||||
|
|
||||||
format_box = g_object_get_data (G_OBJECT (entry), "zoitechat-format-box");
|
format_box = g_object_get_data (G_OBJECT (entry), "zoitechat-format-box");
|
||||||
@@ -1095,12 +1114,12 @@ mg_input_format_update (GtkEntry *entry)
|
|||||||
|
|
||||||
if (state.foreground >= 0)
|
if (state.foreground >= 0)
|
||||||
{
|
{
|
||||||
g_snprintf (color, sizeof (color), "Text color <b>%02d</b>", state.foreground);
|
mg_input_format_color_value (color, sizeof (color), "Text color", state.foreground);
|
||||||
mg_input_format_append (summary, color);
|
mg_input_format_append (summary, color);
|
||||||
}
|
}
|
||||||
if (state.background >= 0)
|
if (state.background >= 0)
|
||||||
{
|
{
|
||||||
g_snprintf (color, sizeof (color), "Background <b>%02d</b>", state.background);
|
mg_input_format_color_value (color, sizeof (color), "Background", state.background);
|
||||||
mg_input_format_append (summary, color);
|
mg_input_format_append (summary, color);
|
||||||
}
|
}
|
||||||
if (state.pending_foreground)
|
if (state.pending_foreground)
|
||||||
|
|||||||
Reference in New Issue
Block a user