Skip to content

Commit e5e4fba

Browse files
committed
triggerreply.py 0.4.3: add compatibility with WeeChat >= 3.2 (XDG directories)
1 parent 8a8e66d commit e5e4fba

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

python/triggerreply.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@
3737
- cooldown (max. n replies in t time)
3838
- random delay, so more human-like
3939
- even more randomness: can specify randomness of the reply/replies group.
40-
05-09-20 - new function - actions
40+
2020-09-05 - new function - actions
41+
2021-05-06 - Sébastien Helleu <[email protected]>
42+
Add compatibility with WeeChat >= 3.2 (XDG directories).
4143
4244
Bugs: not that i'm aware of.
4345
"""
@@ -54,7 +56,7 @@
5456

5557
SCRIPT_NAME = "triggerreply"
5658
SCRIPT_AUTHOR = "Vlad Stoica <[email protected]>"
57-
SCRIPT_VERSION = "0.4.2"
59+
SCRIPT_VERSION = "0.4.3"
5860
SCRIPT_LICENSE = "GPL3"
5961
SCRIPT_DESC = "Auto replies when someone sends a specified trigger. Now with 100% more regex!"
6062
pcooldown = 1
@@ -391,7 +393,10 @@ def command_input_callback(data, buffer, argv):
391393

392394

393395
if weechat.register(SCRIPT_NAME, SCRIPT_AUTHOR, SCRIPT_VERSION, SCRIPT_LICENSE, SCRIPT_DESC, "", ""):
394-
db_file = "%s/trigge.rs" % weechat.info_get("weechat_dir", "")
396+
options = {
397+
'directory': 'data',
398+
}
399+
db_file = weechat.string_eval_path_home("%h/trigge.rs", {}, {}, options)
395400
if weechat.config_get_plugin('debug') == "":
396401
weechat.config_set_plugin('debug', "0")
397402

0 commit comments

Comments
 (0)