Jump to content

Character creation with special characters


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
Share on other sites

  • 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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 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


 

Link to comment
Share on other sites

  • 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! 👊 

Link to comment
Share on other sites

Announcements



×
×
  • 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.