From 09e5bd6053df3c848b1ea853d23aebb145398dac Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Sun, 27 Sep 2015 11:03:56 +0200 Subject: url_titles: Load config when running from the command-line. --- modules/url_titles.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/url_titles.py b/modules/url_titles.py index 5c5ae1b..e4bbae6 100644 --- a/modules/url_titles.py +++ b/modules/url_titles.py @@ -152,6 +152,8 @@ class Module: self.irc.msg(channel if not channel == self.irc.nickname else nick.split('!')[0], titles) if __name__ == '__main__': - import sys + import sys, ConfigParser, os + config = ConfigParser.ConfigParser() + config.read([os.path.expanduser('~/.fot')]) m = Module(None) print m.get_titles(' '.join(sys.argv[1:])) -- cgit v1.2.3