diff --git a/Changelog b/Changelog index 8352203..425cf94 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,7 @@ [Changes 1.2c01] +* Fixes and improvements for channel logging. (caf) + * Use correct (MODECHAN and MODEUSER) display level for channel and user modes. (caf) diff --git a/include/struct.h b/include/struct.h index 9a5cfd8..7370066 100644 --- a/include/struct.h +++ b/include/struct.h @@ -946,12 +946,10 @@ typedef struct channel_stru char *chanpass; /* if TS4 then this has the channel pass */ char connected; /* true if this channel is actually connected */ - HashEntry NickListTable[NICKLIST_HASHSIZE]; chan_flags flags; - time_t max_idle; /* max idle time for this channel */ int tog_limit; int check_idle; /* toggle idle check */ @@ -959,7 +957,6 @@ typedef struct channel_stru struct timeval channel_create; /* time for channel creation */ struct timeval join_time; /* time of last join */ - int stats_ops; /* total ops I have seen in channel */ int stats_dops; /* total dops I have seen in channel */ int stats_bans; /* total bans I have seen in channel */ @@ -988,12 +985,9 @@ typedef struct channel_stru CSetList *csets; /* All Channel sets */ - - int msglog_on; FILE *msglog_fp; char *logfile; - unsigned long log_level; int totalnicks; /* total number of users in channel */ int maxnicks; /* max number of users I have seen */ @@ -1001,7 +995,6 @@ typedef struct channel_stru int totalbans; /* total numbers of bans on channel */ - BanList *bans; /* pointer to list of bans on channel */ BanList *exemptbans; /* pointer to list of bans on channel */ int maxbans; /* max number of bans I have seen */ diff --git a/source/cset.c b/source/cset.c index 999111e..6921251 100644 --- a/source/cset.c +++ b/source/cset.c @@ -1200,19 +1200,15 @@ void log_channel(CSetArray *var, CSetList *cs) void set_msglog_channel_level(CSetArray *var, CSetList *cs) { - ChannelList *chan; - if ((chan = lookup_channel(cs->channel, from_server, 0))) - { - chan->log_level = parse_lastlog_level(cs->log_level, 1); - set_cset_str_var(cs, CHANNEL_LOG_LEVEL_CSET, bits_to_lastlog_level(chan->log_level)); - } + cs->channel_log_level = parse_lastlog_level(cs->log_level, 1); + set_cset_str_var(cs, CHANNEL_LOG_LEVEL_CSET, bits_to_lastlog_level(cs->channel_log_level)); } void do_logchannel(unsigned long level, ChannelList *chan, char *format, ...) { if (!chan || !get_cset_int_var(chan->csets, CHANNEL_LOG_CSET)) return; - if ((chan->log_level & level) && format) + if ((chan->csets->channel_log_level & level) && format) { char s[BIG_BUFFER_SIZE+1]; va_list args;