diff options
author | TingPing <tingping@tingping.se> | 2013-06-06 17:47:01 -0400 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2013-06-06 17:47:01 -0400 |
commit | cf505b850bb02e7b691fbd5f48618d66fe55bc0a (patch) | |
tree | 83395d6ac39c5b90c21a2664edd001425f961bbc /src/common | |
parent | fd762303b0c655f77ddff3004bfaaf11cc6c4e0d (diff) |
Add chanopt for stripping colors
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/chanopt.c | 2 | ||||
-rw-r--r-- | src/common/hexchat.c | 1 | ||||
-rw-r--r-- | src/common/hexchat.h | 1 | ||||
-rw-r--r-- | src/common/text.c | 2 |
4 files changed, 5 insertions, 1 deletions
diff --git a/src/common/chanopt.c b/src/common/chanopt.c index 65c27d58..9e841cb6 100644 --- a/src/common/chanopt.c +++ b/src/common/chanopt.c @@ -65,6 +65,7 @@ static const channel_options chanopt[] = {"text_hidejoinpart", "CONFMODE", S_F(text_hidejoinpart)}, {"text_logging", NULL, S_F(text_logging)}, {"text_scrollback", NULL, S_F(text_scrollback)}, + {"text_strip", NULL, S_F(text_strip)}, }; #undef S_F @@ -179,6 +180,7 @@ typedef struct guint8 text_hidejoinpart; guint8 text_logging; guint8 text_scrollback; + guint8 text_strip; char *network; char *channel; diff --git a/src/common/hexchat.c b/src/common/hexchat.c index 65999794..fb9dde5c 100644 --- a/src/common/hexchat.c +++ b/src/common/hexchat.c @@ -465,6 +465,7 @@ session_new (server *serv, char *from, int type, int focus) sess->text_hidejoinpart = SET_DEFAULT; sess->text_logging = SET_DEFAULT; sess->text_scrollback = SET_DEFAULT; + sess->text_strip = SET_DEFAULT; sess->lastact_idx = LACT_NONE; diff --git a/src/common/hexchat.h b/src/common/hexchat.h index 5fdbfc45..1a759f14 100644 --- a/src/common/hexchat.h +++ b/src/common/hexchat.h @@ -398,6 +398,7 @@ typedef struct session guint8 text_hidejoinpart; guint8 text_logging; guint8 text_scrollback; + guint8 text_strip; struct server *server; void *usertree_alpha; /* pure alphabetical tree */ diff --git a/src/common/text.c b/src/common/text.c index 98ddd775..3d1c9280 100644 --- a/src/common/text.c +++ b/src/common/text.c @@ -2043,7 +2043,7 @@ text_emit (int index, session *sess, char *a, char *b, char *c, char *d) { char *word[PDIWORDS]; int i; - unsigned int stripcolor_args = (prefs.hex_text_stripcolor_msg ? 0xFFFFFFFF : 0); + unsigned int stripcolor_args = (chanopt_is_set (prefs.hex_text_stripcolor_msg, sess->text_strip) ? 0xFFFFFFFF : 0); char tbuf[NICKLEN + 4]; if (prefs.hex_text_color_nicks && (index == XP_TE_CHANACTION || index == XP_TE_CHANMSG)) |