chiark
/
gitweb
/
~matthewv
/
irc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New trout from adam
[irc.git]
/
acrobat.py
diff --git
a/acrobat.py
b/acrobat.py
index 6bed11a18dcc70e92640353b39c77c269d748d4d..0d9202ea8f46b430cc2de8cfb0199b55ec58e4fd 100755
(executable)
--- a/
acrobat.py
+++ b/
acrobat.py
@@
-1,4
+1,4
@@
-#!/usr/bin/env python
2
+#!/usr/bin/env python
#
# Bot logic:
# Andrew Walkingshaw <andrew@lexical.org.uk>
#
# Bot logic:
# Andrew Walkingshaw <andrew@lexical.org.uk>
@@
-78,7
+78,7
@@
class Acrobat(SingleServerIRCBot):
self.connection.notice(nick, msg)
def main():
self.connection.notice(nick, msg)
def main():
- if len(sys.argv)
!=
2:
+ if len(sys.argv)
<
2:
print "acrobat: provide configuration module name on command line"
sys.exit(1)
try:
print "acrobat: provide configuration module name on command line"
sys.exit(1)
try:
@@
-86,6
+86,10
@@
def main():
except ImportError:
print "acrobat: configuration module "+sys.argv[1]+".py not found"
sys.exit(1)
except ImportError:
print "acrobat: configuration module "+sys.argv[1]+".py not found"
sys.exit(1)
+ # Override configuration items from the rest of the command line
+ for opt in sys.argv[2:]:
+ (key,value)=opt.split("=")
+ c.__dict__[key] = value
bot = Acrobat(c)
bot.start()
bot = Acrobat(c)
bot.start()