]> jfr.im git - irc/quakenet/qwebirc.git/commitdiff
Improve run.sh, also correct typo in example config.
authorChris Porter <redacted>
Fri, 11 Jul 2008 00:31:28 +0000 (01:31 +0100)
committerChris Porter <redacted>
Fri, 11 Jul 2008 00:31:28 +0000 (01:31 +0100)
.hgignore
config.py.example
run.sh

index a005d352883052204c90227afa0501a23f8addf3..f9a7ef2758f6e3ccc1c28fe5e8a967e78f3cf54d 100644 (file)
--- a/.hgignore
+++ b/.hgignore
@@ -9,3 +9,4 @@ dropin.cache
 *.pyc
 *.log*
 *.pid
+defargs.conf
index b1e1bd792de55dda68f9d1bbbcd07c69f0c8ee21..c69671e00ef66b6d67c2aea5d29687d9f89e3095 100644 (file)
@@ -2,5 +2,5 @@ IRCSERVER, IRCPORT = "moo.com", 6667
 HMACKEY = "mrmoo"
 HMACTEMPORAL = 30
 UPDATE_FREQ = 0.5
-MAXBUFSIZE = 10000
+MAXBUFLEN = 10000
 MAXSUBSCRIPTIONS = 3
diff --git a/run.sh b/run.sh
index 75e08a1d63d8f245c0949f6ecd08b8ea88df0578..fd3c4cc2361360539abd4b23189c15022fb93216 100755 (executable)
--- a/run.sh
+++ b/run.sh
@@ -1,3 +1,23 @@
 #!/bin/sh
 export PYTHONPATH=.:${PYTHONPATH}
-twistd qwebirc -n
+
+if [ -f "defargs.conf" ]; then
+  ARGS=$(cat defargs.conf)
+else
+  ARGS=
+fi
+
+PREARGS=
+if [ "$1" = "-n" ]; then
+  PREARGS=$1
+  shift
+fi
+
+if [ "$1" != "" ]; then
+  if [ "$ARGS" != "" ]; then
+    echo "Not using default arguments: $ARGS"
+  fi
+  ARGS=$*
+fi
+
+twistd $PREARGS qwebirc -n $ARGS