Fix some bugs
authorMatthew McPherrin <matthew@mcpherrin.ca>
Wed, 14 Mar 2012 18:51:16 +0000 (14:51 -0400)
committerMatthew McPherrin <matthew@mcpherrin.ca>
Wed, 14 Mar 2012 18:51:16 +0000 (14:51 -0400)
irc
tests.d/10_sockets.py

diff --git a/irc b/irc
index 57620ed..db52889 100755 (executable)
--- a/irc
+++ b/irc
@@ -8,7 +8,7 @@ if [ $R -ne 0 ]; then
        D="mimcpher: CSC System Failure: `$script`"
        if [ $? -ne 0 ]; then
                echo $D
-               echo $D | ircpipe irc.freenode.net \#csc
+               echo $D | $HOME/bin/ircpipe irc.freenode.net \#csc
        else
                echo "Intermittent failure: $D"
        fi
index 1c55f1b..c50834b 100755 (executable)
@@ -3,10 +3,10 @@
 import sys, socket
 
 services = [
-  ('caffeine.csclub.uwaterloo.ca',            [22, 25, 80, 110, 143, 143, 443, 465, 587, 993, 995]),
+  ('caffeine.csclub.uwaterloo.ca',            [22, 80, 443]),
+  ('mail.csclub.uwaterloo.ca',                [25, 80, 110, 110, 143, 143, 993, 465, 587, 993, 995]),
   ('artificial-flavours.csclub.uwaterloo.ca', [22, 389, 636]),
   ('taurine.csclub.uwaterloo.ca',             [22]),
-  ('natural-flavours.csclub.uwaterloo.ca',    [22]),
   ('mirror.csclub.uwaterloo.ca',              [21, 22, 80, 873]),
   ('denardo.csclub.uwaterloo.ca',             [22]),
   ('corn-syrup.csclub.uwaterloo.ca',          [22]),
@@ -21,6 +21,7 @@ for S in services:
    host = socket.gethostbyname(S[0])
    for port in S[1]:
      s = socket.socket()
+     s.settimeout(3)
      s.connect( (host , port) )
      s.close()
   except socket.error, e: