protected void connectAndJoin() {
		while (!connected) // keep trying until successfully connected
		{
			try {
				bot.setName_(name);
				bot.connect(network);
				Thread.sleep(1000); // allow it some time before identifiying
				bot.identify(command);
				Thread.sleep(2000); // allow the ident to go through before joining
				bot.joinChannel(gameChan);
				bot.setMode(gameChan, "-m");
				connected = true;
			} catch (IOException iox) {
				System.err.println("Could not connect/IO");
			} catch (NickAlreadyInUseException niux) {
				System.err.println("Nickname is already in use. Choose another nick");
				System.exit(1);
			} catch (IrcException ircx) {
				System.err.println("Could not connect/IRC");
			} catch (InterruptedException iex) {
				System.err.println("Could not connect/Thread");
			}
		}
	}