summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjason2012-07-21 05:37:53 -0600
committerjason2012-07-21 05:37:53 -0600
commit44176ad5d8c959245bf114007d35e00c1909a196 (patch)
treeafb8cc286c5a14c029d84a908affcd0f1c9e4a78
parenta195443e5eb259a63de0a55ba9b1df5c757067ed (diff)
downloadwarmachine-44176ad5d8c959245bf114007d35e00c1909a196.tar.gz
warmachine-44176ad5d8c959245bf114007d35e00c1909a196.zip
Added support for an external settings file.
-rw-r--r--settings.py12
-rwxr-xr-xwarmachine.py6
2 files changed, 16 insertions, 2 deletions
diff --git a/settings.py b/settings.py
new file mode 100644
index 0000000..7884422
--- /dev/null
+++ b/settings.py
@@ -0,0 +1,12 @@
1NICKNAME = 'warmachine'
2
3SERVER = 'irc.freenode.org'
4PORT = 6667
5IDENT = 'warmachine'
6
7CHANNELS = ('#antitech-dev',)
8
9try:
10 from local_settings.py import *
11except ImportError:
12 pass \ No newline at end of file
diff --git a/warmachine.py b/warmachine.py
index 1134c75..148ad65 100755
--- a/warmachine.py
+++ b/warmachine.py
@@ -92,7 +92,9 @@ class IRC(object):
92 print e 92 print e
93 93
94if __name__ == '__main__': 94if __name__ == '__main__':
95 i = IRC('irc.freenode.org', 'warmachine', 'warmachine') 95 import settings
96 i = IRC(settings.SERVER, settings.NICKNAME, settings.IDENT)
96 i.connect() 97 i.connect()
97 i.join('#antitech-dev') 98 for channel in settings.CHANNELS:
99 i.join(channel)
98 i.MainLoop() 100 i.MainLoop()