Jump to content

Recommended Posts

  • Premium

Hello!


I found it, how can you do it from source.
Im sorry, if somewhere is already posted, but i didnt found it.

spacer.png

// game/src/localeservice.cpp
// search:

int check_name_alphabet(const char * str)

// make like this:

int check_name_alphabet(const char * str)
{
	const char*	tmp;

	if (!str || !*str)
		return 0;

	if (strlen(str) < 2)
		return 0;

	for (tmp = str; *tmp; ++tmp)
	{
		// ¾ËÆÄºª°ú ¼öÀÚ¸¸ Çã¿ë
		if (isdigit(*tmp) || isalpha(*tmp))
			continue;
#ifdef USE_SPECIAL_CHARACTERS
		switch (*tmp)
		{
		case ' ':
		case '.':
		case '-':
		case '_':
		case '@':
		case '!':
		case '^':
		case '#':
		case '$':
		case '%':
		case '&':
		case '*':
		case '(':
		case ')':
			continue;
		}
#endif
			return 0;
	}

	return check_name_independent(str);
}

// server/common/service.h
// add this at end of file (ATTENTION! if you have #endif in the last line, add it BEFORE!)

#define USE_SPECIAL_CHARACTERS

Have a nice day ^^

  • Metin2 Dev 11
  • Angry 1
  • Lmao 3
  • Good 3
  • Love 3

Ulthar

Link to comment
https://metin2.dev/topic/26746-character-creation-with-special-characters/
Share on other sites

9 hours ago, TAUMP said:

sql injection inc

That comment is dumb af. You can't secure your self against sql injections by just disallowing people from using special characters. That's not the point of cyber defence.

  • Contributor
11 minutes ago, Ulthar said:

I dont understand your question :D

I think he "thought in reverse" thinking you forbid the chars at the switch while you actually allows them there. Char ';' is because it seperates sql commands to try sql injection that's why he wanted to block it while it's blocked by default.

Edited by TMP4
3 hours ago, TMP4 said:

I think he "thought in reverse" thinking you forbid the chars at the switch while you actually allows them there. Char ';' is because it seperates sql commands to try sql injection that's why he wanted to block it while it's blocked by default.

dsmGaKWMeHXe9QuJtq_ys30PNfTGnMsRuHuo_MUz

Edited by Metin2 Dev
Core X - External 2 Internal
  • Lmao 1
  • 1 year later...
  • Premium
1 hour ago, ReFresh said:

@ ASIKOOLooks like it was this:

 

Hidden Content

 

server/game/src/locale_service.cpp:

  Hide contents
int check_name_alphabet(const char* str)
{
    const char* tmp;

    if (!str || !*str)
        return 0;

    if (strlen(str) < 2)
        return 0;

    for (tmp = str; *tmp; ++tmp)
    {
        if (isdigit(tmp) || isalpha(tmp))
            continue;
    #ifdef USE_SPECIAL_CHARACTERS
        switch (*tmp)
        {
        case ' ':
        case '.':
        case '-':
        case '_':
        case '@':
        case '!':
        case '^':
        case '#':
        case '$':
        case '%':
        case '&':
        case '*':
        case '(':
        case ')':
            continue;
        }
    #endif
    return 0;
    }

    return check_name_independent(str);
}

 

 

 

Well, i can create now invisible name. Thanks ReFresh! IM INVISIBLE MAN

  • kekw 1
  • Scream 1


 

  • Active+ Member
15 minutes ago, TAUMP said:

Well, i can create now invisible name. Thanks ReFresh! IM INVISIBLE MAN

No one said, it's correct way to add special characters to the name. I just probably found the thing, for which was Asikoo asking. That's why I posted that.

Edited by ReFresh

I'll be always helpful!  😉

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.