Change the default awaylog_file to ~/irclogs/away.log.

The new location is more compatible with Capsicum sandboxing,
and also seems a bit more logical - it is, after all, a log file.

Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
This commit is contained in:
Edward Tomasz Napierala 2017-11-04 15:30:26 +00:00
commit 2518737f84
4 changed files with 4 additions and 9 deletions

View file

@ -7,7 +7,6 @@ or the libraries it depends on.
To make Irssi enter capability mode on startup, add To make Irssi enter capability mode on startup, add
capsicum = "yes"; capsicum = "yes";
awaylog_file = "~/irclogs/away.log";
to your ~/.irssi/config and restart the client. Alternatively you can to your ~/.irssi/config and restart the client. Alternatively you can
enter it "by hand", using the "/capsicum enter" command. From the security enter it "by hand", using the "/capsicum enter" command. From the security

View file

@ -973,7 +973,7 @@ If <color> is a
yourself unaway, Irssi will display all the messages in the awaylog. yourself unaway, Irssi will display all the messages in the awaylog.
/SET awaylog_level <level> - Default is MSGS HILIGHT /SET awaylog_level <level> - Default is MSGS HILIGHT
/SET awaylog_file <filename> - Default is ~/.irssi/away.log /SET awaylog_file <filename> - Default is ~/irclogs/away.log
You can disable this feature by setting awaylog_level to NONE. You can disable this feature by setting awaylog_level to NONE.

View file

@ -365,7 +365,7 @@ Ctrl-X - set the next server in list active
<p>Irssi can automatically log important messages when youre set away (<code>/AWAY reason</code>). When you set yourself unaway (<code>/AWAY</code>), the new messages in away log are printed to screen. You can configure it with:</p> <p>Irssi can automatically log important messages when youre set away (<code>/AWAY reason</code>). When you set yourself unaway (<code>/AWAY</code>), the new messages in away log are printed to screen. You can configure it with:</p>
<div><div><pre><code>/SET awaylog_level MSGS HILIGHT - Specifies what messages to log <div><div><pre><code>/SET awaylog_level MSGS HILIGHT - Specifies what messages to log
/SET awaylog_file ~/.irssi/away.log - Specifies the file to use /SET awaylog_file ~/irclogs/away.log - Specifies the file to use
</code></pre></div></div> </code></pre></div></div>
<p>Easiest way to start logging with Irssi is to use autologging. With it Irssi logs all channels and private messages to specified directory. You can turn it on with</p> <p>Easiest way to start logging with Irssi is to use autologging. With it Irssi logs all channels and private messages to specified directory. You can turn it on with</p>
@ -684,4 +684,4 @@ Ctrl-X - set the next server in list active
/STATUSBAR &lt;name&gt; REMOVE &lt;item&gt; /STATUSBAR &lt;name&gt; REMOVE &lt;item&gt;
</code></pre></div></div> </code></pre></div></div>
<p>For statusbar scripts, the item name is usually equivalent to the script name. The documentation of the script ought to tell you if this is not the case. For example, to add mail.pl before the window activity item, use: <code>/STATUSBAR window ADD -before act mail</code>.</p> <p>For statusbar scripts, the item name is usually equivalent to the script name. The documentation of the script ought to tell you if this is not the case. For example, to add mail.pl before the window activity item, use: <code>/STATUSBAR window ADD -before act mail</code>.</p>

View file

@ -105,15 +105,11 @@ static void sig_away_changed(SERVER_REC *server)
void log_away_init(void) void log_away_init(void)
{ {
char *awaylog_file;
awaylog = NULL; awaylog = NULL;
away_filepos = 0; away_filepos = 0;
away_msgs = 0; away_msgs = 0;
awaylog_file = g_strconcat(get_irssi_dir(), "/away.log", NULL); settings_add_str("log", "awaylog_file", "~/irclogs/away.log");
settings_add_str("log", "awaylog_file", awaylog_file);
g_free(awaylog_file);
settings_add_level("log", "awaylog_level", "msgs hilight"); settings_add_level("log", "awaylog_level", "msgs hilight");
signal_add("log written", (SIGNAL_FUNC) sig_log_written); signal_add("log written", (SIGNAL_FUNC) sig_log_written);