public void adduser(String username, int bot, PrintWriter sockout, Socket socket)
    {
        debug("add user " + username);
        int i = 0;
        for (; i <= this.users; i++)
        {
            if (charnames[i] == null || charnames[i].equals(""))
            {
                this.charnames[i] = username;
                this.bots[i] = bot;
                this.usersocks[i] = sockout;
                this.socks[i] = socket;
                this.status[i] = 1;
                debug("user " + username + " added at " + i);
                break;
            }
        }
        debug(Integer.toString(i));
        if (i == this.users)
        {
            this.users++;
        }
        debug("current users(add) " + this.users);
        writelobbyall(username, getaddpacket(username));
    }