From anonymous, 10 Years ago, written in Python.
Embed
  1. #irconnect.py
  2.  
  3. import sys
  4.  
  5. if (len(sys.argv) > 1):
  6.    try:
  7.       server = sys.argv[1] + ":"
  8.       port_str = sys.argv[2]
  9.       port = int(port_str)
  10.       full = server + str(port)
  11.       if server and str(port):
  12.          if port:
  13.             print full
  14.          else:
  15.             print "Port does not exist, Please only use numbers!"
  16.       else:
  17.          print "No idea what just happend, SO idk what to put here"      
  18.    except:
  19.       print "Incorrect syntax."
  20.       print "Missing parameters (2) -> [server port]"
  21. else:
  22.    print "Incorrect syntax."
  23.    print "Missing parameters (2) -> [server port]"