Skip to forum content

You are not logged in. Please login or register.


forums.pvpgn.pro → [RU] The Source Code → /seticon HELP

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 10

1 (edited by SkyFall 15.09.2016 20:59)

Topic: /seticon HELP

Пожалуйста помогите разобраться что в коде не так

static int _handle_seticon_command(t_connection * c, char const *text)
{
    t_account *    account;
    char *    command;
    char *    username;
    char *  icon;
    char     t[MAX_MESSAGE_LEN];
    unsigned int i,j;
    char    arg1[256];
    char    arg2[256];
    char    arg3[256];

    std::strncpy(t, text, MAX_MESSAGE_LEN - 1);
    for (i=0; t[i]!=' ' && t[i]!='\0'; i++); /* skip command /groups */

    for (; t[i]==' '; i++); /* skip spaces */
    for (j=0; t[i]!=' ' && t[i]!='\0'; i++) /* get command */
    if (j<sizeof(arg1)-1) arg1[j++] = t[i];
    arg1[j] = '\0';

    for (; t[i]==' '; i++); /* skip spaces */
    for (j=0; t[i]!=' ' && t[i]!='\0'; i++) /* get username */
    if (j<sizeof(arg2)-1) arg2[j++] = t[i];
    arg2[j] = '\0';

    for (; t[i]==' '; i++); /* skip spaces */
    for (j=0; t[i]!='\0'; i++) /* get icon */
    if (j<sizeof(arg3)-1) arg3[j++] = t[i];
    arg3[j] = '\0';

    command = arg1;
    username = arg2;
    icon = arg3;
    
    for (i=0; i<std::strlen(icon); i++)
    if (std::isupper((int)icon[i])) icon[i] = std::tolower((int)icon[i]);
    
    if (arg1[0] =='\0') {
    message_send_text(c,message_type_info,c,"usage: /seticon <command> <username> <icon code>");
    return 0;
    }

    if (!std::strcmp(command,"help") || !std::strcmp(command,"h")) {
    message_send_text(c,message_type_info,c,"Set icons (Setting custom icons for users).");
    message_send_text(c,message_type_info,c,"Type: /seticon add <username> <icon code> - añadir un icono al perfil de usuario");
    message_send_text(c,message_type_info,c,"Type: /seticon del <username> <icon code> - eliminar un icono del perfil de usuario");
    message_send_text(c,message_type_info,c,"Type: /seticon list <username> - muestra iconos de usuario actual que puede utilizar");
    return 0;
    }

    if (arg2[0] =='\0') {
    message_send_text(c,message_type_info,c,"usage: /seticon <command> <username> <icon code>");
    return 0;
    }

    if (!(account = accountlist_find_account(username))) {
    message_send_text(c,message_type_error,c,"Invalid user.");
    return 0;
    }

    if (!std::strcmp(command,"list") || !std::strcmp(command,"l")) {
        
        message_send_text(c,message_type_info,c,"Icon Code: Icon name , Attribute");
        message_send_text(c,message_type_info,c,"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");    
        snprintf(msgtemp, sizeof(msgtemp), "BKBK: Лансер , %d",account_get_auth_icon(account,"BKBK"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "DKBK: Акаша , %d",account_get_auth_icon(account,"DKBK"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "EKBK: Анти маг , %d",account_get_auth_icon(account,"EKBK"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "BMOB: Баланар , %d",account_get_auth_icon(account,"BMOB"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "BYCW ,Бетмен  %d",account_get_auth_icon(account,"BYCW"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "LEYB: Пугна , %d",account_get_auth_icon(account,"LEYB"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "ULBF: Зевс , %d",account_get_auth_icon(account,"ULBF"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "DERF: Ночной елф (девка) , %d",account_get_auth_icon(account,"DERF"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "ICWF: Винда(девка) , %d",account_get_auth_icon(account,"ICWF"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "ULBS: Воид , %d",account_get_auth_icon(account,"ULBS"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "GSEV: Венга(девка) , %d",account_get_auth_icon(account,"GSEV"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "RKPS: Трал , %d",account_get_auth_icon(account,"RKPS"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "DERS: Дерзкая(сиски) , %d",account_get_auth_icon(account,"DERS"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "LEYS: Минер , %d",account_get_auth_icon(account,"LEYS"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "MKBK: Супермен , %d",account_get_auth_icon(account,"MKBK"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "PKBK: Мирана , %d",account_get_auth_icon(account,"PKBK"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "WKBK: Тинкер , %d",account_get_auth_icon(account,"WKBK"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "KAHS: Шейкер , %d",account_get_auth_icon(account,"KAHS"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "GEUP: ПУДЖ , %d",account_get_auth_icon(account,"GEUP"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "AKIP: Пикачу , %d",account_get_auth_icon(account,"AKIP"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "DKAP: Панда(шторм) , %d",account_get_auth_icon(account,"DKAP"));
        message_send_text(c,message_type_info,c,msgtemp);        
        snprintf(msgtemp, sizeof(msgtemp), "EVEN: Невер(СФ) , %d",account_get_auth_icon(account,"EVEN"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "XIAN: Наикс , %d",account_get_auth_icon(account,"XIAN"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "HCIL: Лич , %d",account_get_auth_icon(account,"HCIL"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "IKRD: Друид(медведь) , %d",account_get_auth_icon(account,"IKRD"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "REES: Чен , %d",account_get_auth_icon(account,"REES"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "LAZE: Эзалор , %d",account_get_auth_icon(account,"LAZE"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "NOIR: Фура , %d",account_get_auth_icon(account,"NOIR"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "OBOB: Гупка боб , %d",account_get_auth_icon(account,"OBOB"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "ESOL: Лузер , %d",account_get_auth_icon(account,"ESOL"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "UPCI: Клавиатура и мышка , %d",account_get_auth_icon(account,"UPCI"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "LPPA: Apple(яблоко) , %d",account_get_auth_icon(account,"LPPA"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "TAVA: Аватар , %d",account_get_auth_icon(account,"TAVA"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "1EXA: Топор(мясной) , %d",account_get_auth_icon(account,"1EXA"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "DNEB: Бендер , %d",account_get_auth_icon(account,"DNEB"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "1TAC: Кот , %d",account_get_auth_icon(account,"1TAC"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "TRAD: DART(из starwars) , %d",account_get_auth_icon(account,"TRAD"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "1GOD: Собака , %d",account_get_auth_icon(account,"1GOD"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "1EYE: Глаз , %d",account_get_auth_icon(account,"1EYE"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "1XOF: Мозилла(браузер) , %d",account_get_auth_icon(account,"1XOF"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "2XOF: Анимешка(девка) , %d",account_get_auth_icon(account,"2XOF"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "RAAG: Гара(из наруто) , %d",account_get_auth_icon(account,"RAAG"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "ZDOG: хз , %d",account_get_auth_icon(account,"ZDOG"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "VARG: Могила , %d",account_get_auth_icon(account,"VARG"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "DAEH: из южного парка , %d",account_get_auth_icon(account,"DAEH"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "1ORI: Железный человек , %d",account_get_auth_icon(account,"1ORI"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "2ORI: Железный человек(белый) , %d",account_get_auth_icon(account,"2ORI"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "OSAJ: Маска , %d",account_get_auth_icon(account,"OSAJ"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "GKAK: из наруто , %d",account_get_auth_icon(account,"GKAK"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "SKAK: Какаши(из наруто) , %d",account_get_auth_icon(account,"SKAK"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "1RAK: из южного парка , %d",account_get_auth_icon(account,"1RAK"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "2RAK: из южного парка , %d",account_get_auth_icon(account,"2RAK"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "NNEK: из южного парка , %d",account_get_auth_icon(account,"NNEK"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "ELYK: из южного парка , %d",account_get_auth_icon(account,"ELYK"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "IRAM: марио , %d",account_get_auth_icon(account,"IRAM"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "AHRM: хз , %d",account_get_auth_icon(account,"AHRM"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "HSUM: гриб , %d",account_get_auth_icon(account,"HSUM"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "URAN: Наруто , %d",account_get_auth_icon(account,"URAN"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "LBIN: из футурама , %d",account_get_auth_icon(account,"LBIN"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "MABO: Обама , %d",account_get_auth_icon(account,"MABO"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "YALP: из Плейбой , %d",account_get_auth_icon(account,"YALP"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "RAHS: Саске(из наруто) , %d",account_get_auth_icon(account,"RAHS"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "UTHS: из Starwars , %d",account_get_auth_icon(account,"UTHS"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "LLKS: Череп , %d",account_get_auth_icon(account,"LLKS"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "11PS: Тини , %d",account_get_auth_icon(account,"11PS"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "RAPS: Южный парк , %d",account_get_auth_icon(account,"RAPS"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "WAPS: Паук , %d",account_get_auth_icon(account,"WAPS"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "MRET: Терминатор , %d",account_get_auth_icon(account,"MRET"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "1NRT: Бупермен , %d",account_get_auth_icon(account,"1NRT"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "2NRT: Грустный Бупермен , %d",account_get_auth_icon(account,"2NRT"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "DOOV: Вуду , %d",account_get_auth_icon(account,"DOOV"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "DIOZ: Зоидберг(из футурама) , %d",account_get_auth_icon(account,"DIOZ"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "NARC: Кран , %d",account_get_auth_icon(account,"NARC"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "KCUF: Надпись FUCK , %d",account_get_auth_icon(account,"KCUF"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "KIRK: Ужас , %d",account_get_auth_icon(account,"KIRK"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "SKIL: Пингвин(сидит) , %d",account_get_auth_icon(account,"SKIL"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "LIMS: Смайлик , %d",account_get_auth_icon(account,"LIMS"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "LKRT: ХАХА , %d",account_get_auth_icon(account,"LKRT"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "GAME: Надпись The Game , %d",account_get_auth_icon(account,"GAME"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "LDSB: Дявол , %d",account_get_auth_icon(account,"LDSB"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "POHZ: Бикини , %d",account_get_auth_icon(account,"POHZ"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "KOHZ: Бикини(чернобелый) , %d",account_get_auth_icon(account,"KOHZ"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "SUOH: Хз голова , %d",account_get_auth_icon(account,"SUOH"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "KMIZ: Алмаз7(розовый) , %d",account_get_auth_icon(account,"KMIZ"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "1TOB: Бюлдозер , %d",account_get_auth_icon(account,"1TOB"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "2TOB: Робот , %d",account_get_auth_icon(account,"2TOB"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "BARC: Краб , %d",account_get_auth_icon(account,"BARC"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "1GMO: Надпись OMG , %d",account_get_auth_icon(account,"1GMO"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "1FTW: Надпись WTF , %d",account_get_auth_icon(account,"1TFW"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "BOBA: Надпись ВОВА , %d",account_get_auth_icon(account,"BOBA"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "GREY: Девка , %d",account_get_auth_icon(account,"GREY"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "MEM1: Чужой смайлик , %d",account_get_auth_icon(account,"MEM1"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "SFLT: СФ(Мультяшний) , %d",account_get_auth_icon(account,"SFLT"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "DELL: Девил , %d",account_get_auth_icon(account,"SFLT"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "LISS: Лиса , %d",account_get_auth_icon(account,"LISS"));
        message_send_text(c,message_type_info,c,msgtemp);
    return 0;
    }
    
    if (arg3[0] =='\0') {
    message_send_text(c,message_type_info,c,"usage: /seticon <command> <username> <icon code>");
    return 0;
    }    
    
    if (!std::strcmp(icon,"BKBK") || !std::strcmp(icon,"DKBK") || !std::strcmp(icon,"EKBK") || !std::strcmp(icon,"BMOB")
    || !std::strcmp(icon,"BYCW") || !std::strcmp(icon,"DERB") || !std::strcmp(icon,"LEYB") || !std::strcmp(icon,"ULBF")
    || !std::strcmp(icon,"DERF") || !std::strcmp(icon,"IKWF") || !std::strcmp(icon,"ULBS") || !std::strcmp(icon,"GSEV")
    || !std::strcmp(icon,"RKPS") || !std::strcmp(icon,"DERS") || !std::strcmp(icon,"LEYS") || !std::strcmp(icon,"MKBK")
    || !std::strcmp(icon,"MKBK") || !std::strcmp(icon,"PKBK") || !std::strcmp(icon,"WKBK") || !std::strcmp(icon,"KAHS")
    || !std::strcmp(icon,"GEUP") || !std::strcmp(icon,"AKIP") || !std::strcmp(icon,"DKAP") || !std::strcmp(icon,"EVEN")
    || !std::strcmp(icon,"MMAH") || !std::strcmp(icon,"XIAN") || !std::strcmp(icon,"HCIL") || !std::strcmp(icon,"IKRD")
    || !std::strcmp(icon,"REES") || !std::strcmp(icon,"LAZE") || !std::strcmp(icon,"NOIR") || !std::strcmp(icon,"OBOB")
    || !std::strcmp(icon,"ESOL") || !std::strcmp(icon,"UPCI") || !std::strcmp(icon,"LPPA") || !std::strcmp(icon,"TAVA")
    || !std::strcmp(icon,"1EXA") || !std::strcmp(icon,"DNEB") || !std::strcmp(icon,"1TAC") || !std::strcmp(icon,"TRAD")
    || !std::strcmp(icon,"1GOD") || !std::strcmp(icon,"1EYE") || !std::strcmp(icon,"1XOF") || !std::strcmp(icon,"2XOF")
    || !std::strcmp(icon,"1YRF") || !std::strcmp(icon,"RAAG") || !std::strcmp(icon,"ZDOG") || !std::strcmp(icon,"VARG")
    || !std::strcmp(icon,"DAEH") || !std::strcmp(icon,"1ORI") || !std::strcmp(icon,"2ORI") || !std::strcmp(icon,"OSAJ")
    || !std::strcmp(icon,"GKAK") || !std::strcmp(icon,"SKAK") || !std::strcmp(icon,"1RAK") || !std::strcmp(icon,"2RAK")
    || !std::strcmp(icon,"NNEK") || !std::strcmp(icon,"ELYK") || !std::strcmp(icon,"IRAM") || !std::strcmp(icon,"AHRM")
    || !std::strcmp(icon,"HSUM") || !std::strcmp(icon,"URAN") || !std::strcmp(icon,"LBIN") || !std::strcmp(icon,"MABO")
    || !std::strcmp(icon,"YALP") || !std::strcmp(icon,"RAHS") || !std::strcmp(icon,"UTHS") || !std::strcmp(icon,"LLKS")
    || !std::strcmp(icon,"11PS") || !std::strcmp(icon,"RAPS") || !std::strcmp(icon,"WAPS") || !std::strcmp(icon,"MRET")
    || !std::strcmp(icon,"1NRT") || !std::strcmp(icon,"2NRT") || !std::strcmp(icon,"DOOV") || !std::strcmp(icon,"DIOZ")
    || !std::strcmp(icon,"NARC") || !std::strcmp(icon,"KCUF") || !std::strcmp(icon,"KIRK") || !std::strcmp(icon,"SKIL")
    || !std::strcmp(icon,"GAME") || !std::strcmp(icon,"LDSB") || !std::strcmp(icon,"POHZ") || !std::strcmp(icon,"KOHZ")
    || !std::strcmp(icon,"SUOH") || !std::strcmp(icon,"KMIZ") || !std::strcmp(icon,"1TOB") || !std::strcmp(icon,"2TOB")
    || !std::strcmp(icon,"BARC") || !std::strcmp(icon,"1GMO") || !std::strcmp(icon,"1FTW") || !std::strcmp(icon,"BOBA")
    || !std::strcmp(icon,"GREY") || !std::strcmp(icon,"1MEM") || !std::strcmp(icon,"SFLT") || !std::strcmp(icon,"DELL") 
    || !std::strcmp(icon,"LISS")) {
        /*Do nothing.*/ 
    }
    else
    {
        eventlog(eventlog_level_warn,__FUNCTION__,"unknown icon: %x", text);
        snprintf(msgtemp, sizeof(msgtemp), "No such icon, unable to set!");
        message_send_text(c,message_type_error,c,msgtemp);
        return 0;
    }
        
    if (!std::strcmp(command,"add") || !std::strcmp(command,"a")) {
    account_set_auth_icon(account, icon, 1);
    snprintf(msgtemp, sizeof(msgtemp) ,"%.128s is setted to the requested account.", icon);
    message_send_text(c,message_type_info,c,msgtemp);
    return 0;
    }

    if (!std::strcmp(command,"del") || !std::strcmp(command,"d")) {
    account_set_auth_icon(account, icon, 0);
    snprintf(msgtemp, sizeof(msgtemp) ,"%.128s is removed from the requested account.", icon);
    message_send_text(c,message_type_info,c,msgtemp);
    return 0;
    }

    snprintf(msgtemp, sizeof(msgtemp), "got unknown command: %.128s", command);
    message_send_text(c,message_type_error,c,msgtemp);
    return 0;

}

компилится норма но вот когда использую
/seticon add nik BKBK (или другие коды которых добавил)
пишет No such icon, unable to set!
прошу помогите найти причину заранее спс

2

Re: /seticon HELP

Чем не устраивает существующая команда /icon?
http://forums.harpywar.com/viewtopic.php?id=1184

Do not ask for support in PM.

3

Re: /seticon HELP

HarpyWar wrote:

Чем не устраивает существующая команда /icon?
http://forums.harpywar.com/viewtopic.php?id=1184

я использую старую версию pvpgn
для нового windows xp не поддерживает

4

Re: /seticon HELP

Давай, я тебе скажу, что есть такая вещь как дебаг.
Для начала ты можешь просто вывести какой код иконки написал игрок. Дальше если иконка правильная, то неправильное условие проверки в команде.

5

Re: /seticon HELP

3 самодостаточных коммита для базовой реализации иконок для старой 1.99 версии:
https://github.com/pvpgn/pvpgn-server/c … 6425248331
https://github.com/pvpgn/pvpgn-server/c … 54ab6f4236
https://github.com/pvpgn/pvpgn-server/c … e906161e28
Позже помнится были ещё пара коммитов с какими-то добавлениями, их можно поискать в истории репо, если очень нужно.

Добавлено: 15.09.2016 00:01

SkyFall, с чем связана необходимость использования XP? Это сервер или ПК?

Do not ask for support in PM.

6 (edited by SkyFall 15.09.2016 14:36)

Re: /seticon HELP

HarpyWar wrote:

SkyFall, с чем связана необходимость использования XP? Это сервер или ПК?

это ПК
спасибо щас попробую и отпишусь

Добавлено: 15.09.2016 15:25

в комплияции пишет "с++ не поддерживает int по умолчанию "
в чем дело?

Post's attachments

Attachment icon error.PNG 27.05 kb, 38 downloads since 2016-09-15 

7

Re: /seticon HELP

c 35 по 39 скинь строки которые в icons.h

8

Re: /seticon HELP

typedef struct //32 строка
        {//33
            char * clienttag;//34
            char * attr_key;//35
            t_list * icon_info;        // list of t_icon_info 36
//37
            t_list * vars;        // list of t_icon_var_info 38
            const char * stats; //39
        } t_iconset_info;//40

9

Re: /seticon HELP

он не понимает, что за тип t_list. найди этот тип в хендлах, где объявляется, и подключи к хендлу icons.

10 (edited by SkyFall 17.09.2016 20:32)

Re: /seticon HELP

Suite wrote:

он не понимает, что за тип t_list. найди этот тип в хендлах, где объявляется, и подключи к хендлу icons.

помоги )

Добавлено: 17.09.2016 21:30

разобрался оказалось в command.cpp include icons.h поставил на верху
теперь стоит на месте только теперь другие проблемы

Добавлено: 18.09.2016 12:02

кто нибудь помогите плис

Post's attachments

Attachment icon Безымянный.PNG 48.73 kb, 33 downloads since 2016-09-17 

Posts: 10

Pages 1

You must login or register to post a reply

Who now at forum

Currently view post: 0 guests, 0 registered users

forums.pvpgn.pro → [RU] The Source Code → /seticon HELP