1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-15 04:28:09 -04:00
irssi/src/fe-common/core/hilight-text.h
Timo Sirainen 391a7e5710 Highlighting updates. -word renamed to -full. Added new -word option
meaning to highlight only the found word in line. Removed -nonick
option but added -line which means pretty much the same. -actcolor
specifies what color to show in activity list, default is the same as
-color. Also uses the nick cache to match nickmasks faster.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1139 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-01-21 04:14:24 +00:00

47 lines
1.3 KiB
C

#ifndef __HILIGHT_TEXT_H
#define __HILIGHT_TEXT_H
#ifdef HAVE_REGEX_H
# include <regex.h>
#endif
typedef struct {
char *text;
char **channels; /* if non-NULL, check the text only from these channels */
int level; /* match only messages with this level, 0=default */
char *color; /* if starts with number, \003 is automatically
inserted before it. */
char *act_color; /* color for window activity */
int priority;
unsigned int nick:1; /* hilight only nick if possible */
unsigned int word:1; /* hilight only word, not full line */
unsigned int nickmask:1; /* `text' is a nick mask */
unsigned int fullword:1; /* match `text' only for full words */
unsigned int regexp:1; /* `text' is a regular expression */
#ifdef HAVE_REGEX_H
unsigned int regexp_compiled:1; /* should always be TRUE, unless regexp is invalid */
regex_t preg;
#endif
} HILIGHT_REC;
extern GSList *hilights;
HILIGHT_REC *hilight_match(SERVER_REC *server, const char *channel,
const char *nick, const char *address,
int level, const char *str,
int *match_beg, int *match_end);
char *hilight_get_color(HILIGHT_REC *rec, int activity);
char *hilight_match_nick(SERVER_REC *server, const char *channel,
const char *nick, const char *address,
int level, const char *msg);
void hilight_text_init(void);
void hilight_text_deinit(void);
#endif