public static void main(String args[]) {
		String cfgPath = "sephiabot.xml";
		boolean greet = true;
		final String usage = "\nUsage: sephiabot [-c config file] [--nogreet]\n" +
			" Default config file: ./sephiabot.xml";

		if (args != null && args.length > 0) {
			for (int i = 0; i < args.length; i++) {
				if (args[i].equals("--help")) {
					System.out.println(usage);
					System.exit(0);
				} else if (args[i].equals("-c")) {
					if (args.length > i+1 && !args[i+1].startsWith("-"))
						cfgPath = args[i+1];
					else {
						System.out.println("You must specify the path of your config file with -c" + usage);
						System.exit(0);
					}
					i++; //Skip the next argument
				} else if (args[i].equals("--nogreet")) {
					greet = false;
				} else {
					System.out.println("Invalid argument: " + args[i] + usage);
					System.exit(0);
				}
			}
		}

		SephiaBot sephiaBot = new SephiaBot(cfgPath, greet);
		sephiaBot.connect();

		while (sephiaBot.hasConnections()) {
			sephiaBot.poll();
		}
		sephiaBot.log("All connections have been closed. Exiting.");
	}