mirror of
https://github.com/irssi/irssi.git
synced 2026-08-20 17:12:51 +02:00
Added time, size and level setting types. Breaks some settings - I'll add
automatic converter to these settings later. Meanwhile you CVS users can fix your config files yourself :) Time settings allow using "days", "hours", "minutes", "seconds" and "milliseconds" or several of their abbreviations. For example "5d 4h 5msecs". Size settings allow using "gbytes", "mbytes", "kbytes" and "bytes" or their abbrevations. For example "5MB". Level settings are currently handled pretty much the way they were before. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3080 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
9c18cb00e7
commit
bd6fe052bc
35 changed files with 526 additions and 186 deletions
|
|
@ -38,16 +38,13 @@ static void sig_log_written(LOG_REC *log)
|
|||
|
||||
static void awaylog_open(void)
|
||||
{
|
||||
const char *fname, *levelstr;
|
||||
const char *fname;
|
||||
LOG_REC *log;
|
||||
int level;
|
||||
|
||||
fname = settings_get_str("awaylog_file");
|
||||
levelstr = settings_get_str("awaylog_level");
|
||||
if (*fname == '\0' || *levelstr == '\0') return;
|
||||
|
||||
level = level2bits(levelstr);
|
||||
if (level == 0) return;
|
||||
level = settings_get_level("awaylog_level");
|
||||
if (*fname == '\0' || level == 0) return;
|
||||
|
||||
log = log_find(fname);
|
||||
if (log != NULL && log->handle != -1)
|
||||
|
|
@ -106,7 +103,7 @@ void log_away_init(void)
|
|||
away_msgs = 0;
|
||||
|
||||
settings_add_str("log", "awaylog_file", IRSSI_DIR_SHORT"/away.log");
|
||||
settings_add_str("log", "awaylog_level", "msgs hilight");
|
||||
settings_add_level("log", "awaylog_level", "msgs hilight");
|
||||
|
||||
signal_add("log written", (SIGNAL_FUNC) sig_log_written);
|
||||
signal_add("away mode changed", (SIGNAL_FUNC) sig_away_changed);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue