Skip to content

Commit 688dfd6

Browse files
committed
luanma.pl 0.3: add compatibility with WeeChat >= 3.2 (XDG directories)
1 parent 88303d2 commit 688dfd6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

perl/luanma.pl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ =head2 parser
141141
=cut
142142

143143
use constant SCRIPT_NAME => 'luanma';
144-
weechat::register(SCRIPT_NAME, 'Nei <anti.teamidiot.de>', '0.2', 'GPL3',
144+
weechat::register(SCRIPT_NAME, 'Nei <anti.teamidiot.de>', '0.3', 'GPL3',
145145
'more flexibility with incoming charset', 'stop_luanma', '') || return;
146146
sub SCRIPT_FILE() {
147147
my $infolistptr = weechat::infolist_get('perl_script', '', SCRIPT_NAME);
@@ -279,7 +279,9 @@ sub get_settings_from_pod {
279279
our $nag_tag;
280280
our %nag_modifiers;
281281

282-
our $CFG_FILE_NAME = weechat::info_get('weechat_dir', '').weechat::info_get('dir_separator', '').SCRIPT_NAME.'.conf';
282+
our $weechat_dir = weechat::info_get('weechat_config_dir', '');
283+
$weechat_dir = weechat::info_get('weechat_dir', '') if (!$weechat_dir);
284+
our $CFG_FILE_NAME = $weechat_dir.weechat::info_get('dir_separator', '').SCRIPT_NAME.'.conf';
283285

284286
our (@CFG_TABLE, @CFG_TABLE_2);
285287
our @STO = (\(our (%BYTE_MSGS, %ESC_MSG, %MSG_TIME, %MSG_BUF, %MSG_NICK, %MSG_ENC, %MSG_FLT, %MSG_COLOR)));

0 commit comments

Comments
 (0)