public int addroom(int mode, String cname, String cpass, String owner, int masterlvl, String ip, PrintWriter socks, BotClass bot)
    {
        for (int i = 0; i <= MAXROOMS; i++)
        {
            if (this.rooms[mode][i] == null || this.rooms[mode][i].isEmpty())
            {
                int[] room =
                {
                    mode, i
                };
                this.rooms[mode][i] = new Room(room, cname, cpass, masterlvl, owner, ip, socks, bot, sql);

                //writelobbyall(owner, getaddpacketroom(room));
                return i;
            }
        }
        return -1;
    }