From 2518737f84026aacb9ea2b384f042d0d4df97033 Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Sat, 4 Nov 2017 15:30:26 +0000 Subject: [PATCH] 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 --- docs/capsicum.txt | 1 - docs/manual.txt | 2 +- docs/startup-HOWTO.html | 4 ++-- src/core/log-away.c | 6 +----- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/docs/capsicum.txt b/docs/capsicum.txt index a3a1b8a7..3093bfe5 100644 --- a/docs/capsicum.txt +++ b/docs/capsicum.txt @@ -7,7 +7,6 @@ or the libraries it depends on. To make Irssi enter capability mode on startup, add capsicum = "yes"; -awaylog_file = "~/irclogs/away.log"; to your ~/.irssi/config and restart the client. Alternatively you can enter it "by hand", using the "/capsicum enter" command. From the security diff --git a/docs/manual.txt b/docs/manual.txt index b2d0de14..88b956b9 100644 --- a/docs/manual.txt +++ b/docs/manual.txt @@ -973,7 +973,7 @@ If is a yourself unaway, Irssi will display all the messages in the awaylog. /SET awaylog_level - Default is MSGS HILIGHT - /SET awaylog_file - Default is ~/.irssi/away.log + /SET awaylog_file - Default is ~/irclogs/away.log You can disable this feature by setting awaylog_level to NONE. diff --git a/docs/startup-HOWTO.html b/docs/startup-HOWTO.html index aaf9e5fe..6c8e2866 100644 --- a/docs/startup-HOWTO.html +++ b/docs/startup-HOWTO.html @@ -365,7 +365,7 @@ Ctrl-X - set the next server in list active

Irssi can automatically log important messages when you’re set away (/AWAY reason). When you set yourself unaway (/AWAY), the new messages in away log are printed to screen. You can configure it with:

/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
 

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

@@ -684,4 +684,4 @@ Ctrl-X - set the next server in list active /STATUSBAR <name> REMOVE <item> -

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: /STATUSBAR window ADD -before act mail.

\ No newline at end of file +

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: /STATUSBAR window ADD -before act mail.

diff --git a/src/core/log-away.c b/src/core/log-away.c index e2a0120b..2fa6737c 100644 --- a/src/core/log-away.c +++ b/src/core/log-away.c @@ -105,15 +105,11 @@ static void sig_away_changed(SERVER_REC *server) void log_away_init(void) { - char *awaylog_file; - awaylog = NULL; away_filepos = 0; away_msgs = 0; - awaylog_file = g_strconcat(get_irssi_dir(), "/away.log", NULL); - settings_add_str("log", "awaylog_file", awaylog_file); - g_free(awaylog_file); + settings_add_str("log", "awaylog_file", "~/irclogs/away.log"); settings_add_level("log", "awaylog_level", "msgs hilight"); signal_add("log written", (SIGNAL_FUNC) sig_log_written);