diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2015-09-27 11:03:56 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2015-09-27 11:03:56 +0200 |
commit | 09e5bd6053df3c848b1ea853d23aebb145398dac (patch) | |
tree | 311f645c5e6d9dde0bffb1c839192e08e4476960 /modules | |
parent | f568d36e0711d3a9d48fd3fe50a07e9e459d3089 (diff) |
url_titles: Load config when running from the command-line.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/url_titles.py | 4 |
1 files changed, 3 insertions, 1 deletions
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:])) |