Merged with Irssi 0.8.6.
[silc.git] / apps / irssi / src / core / log.h
index 7361b6a09abcb71f98e89aa2f09a4ac5fbd10ff8..fae872c7fce3ecfe68e7535dbf32f58b3ffc0e5a 100644 (file)
@@ -6,13 +6,18 @@ enum {
        LOG_ITEM_WINDOW_REFNUM
 };
 
-typedef struct {
+typedef char *(*COLORIZE_FUNC)(const char *str);
+
+typedef struct _LOG_REC LOG_REC;
+typedef struct _LOG_ITEM_REC LOG_ITEM_REC;
+
+struct _LOG_ITEM_REC {
        int type;
         char *name;
        char *servertag;
-} LOG_ITEM_REC;
+};
 
-typedef struct {
+struct _LOG_REC {
        char *fname; /* file name, in strftime() format */
        char *real_fname; /* the current expanded file name */
        int handle; /* file handle */
@@ -22,11 +27,12 @@ typedef struct {
        GSList *items; /* log only on these items */
 
        time_t last; /* when last message was written */
+        COLORIZE_FUNC colorizer;
 
        unsigned int autoopen:1; /* automatically start logging at startup */
        unsigned int failed:1; /* opening log failed last time */
        unsigned int temp:1; /* don't save this to config file */
-} LOG_REC;
+};
 
 extern GSList *logs;
 
@@ -43,7 +49,7 @@ void log_item_destroy(LOG_REC *log, LOG_ITEM_REC *item);
 LOG_ITEM_REC *log_item_find(LOG_REC *log, int type, const char *item,
                            const char *servertag);
 
-void log_file_write(SERVER_REC *server, const char *item, int level,
+void log_file_write(const char *server_tag, const char *item, int level,
                    const char *str, int no_fallbacks);
 void log_write_rec(LOG_REC *log, const char *str, int level);