@Override
	public void run() {
		while (!Vars.stop) {
			DatagramSocket sk = null;
			try {
				sk = new DatagramSocket(3998);
			} catch (SocketException e1) {
				e1.printStackTrace();
			}
			if (sk == null) {
				return;
			}
			try {
				sk.setSoTimeout(5000);
			} catch (SocketException e2) {
				e2.printStackTrace();
			}
			ArrayList<User> usersResponded = new ArrayList<User>();
			for (int i = 0; i < ServerMain.uh.users.size(); i++) {
				byte[] buf = new byte[1000];
				buf = (new Cypher().doCeaserCypher("##PING")).getBytes();
				try {
					ServerMain.sk.send(new DatagramPacket(buf, buf.length,
							ServerMain.uh.users.get(i).address, 3997));
					DatagramPacket dgp = new DatagramPacket(buf, buf.length);

					sk.receive(dgp);
					String rcvd1 = new String(dgp.getData(), 0, dgp.getLength());
					Logger.writeInfo("(PING) MESSAGE RECIEVED: " + rcvd1);
					usersResponded.add(ServerMain.uh.users.get(i));
				} catch (IOException e) {
					e.printStackTrace();
				}
			}

			for (int i = 0; i < ServerMain.uh.users.size(); i++) {
				if (!usersResponded.contains(ServerMain.uh.users.get(i))) {
					ServerMain.rh
					.rejectConnection(
							ServerMain.uh.users.get(i).address,
							"Ping timeout!");
					ServerMain.uh.setOffline(ServerMain.uh.users.get(i).nick);
				}
			}
			try {
				Thread.sleep(60000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}

		}
	}