From The Compiler, 6 Years ago, written in Python.
Embed
  1. import sys, os
  2. import socket
  3.  
  4. servers = [ "megusta.iotairc.net", "rawr.iotairc.net",
  5.             "mbilker.iotairc.net", "alexg.iotairc.net",
  6.             "bitchplease.iotairc.net", "mudkip.iotairc.net",
  7.             "raptor.iotairc.net", "haddaway.iotairc.net",
  8.             "toaster.iotairc.net" ]
  9.  
  10. sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  11. with open("status.txt", "rw") as f:
  12.     for server in servers:
  13.         try:
  14.             sock.connect((server, 6667))
  15.         except socket.gaierror:
  16.             f.write("{} = offline".format(server))
  17.         else:
  18.             f.write("{} = online".format(server))