diff --git a/magicka.strings b/magicka.strings index b476e27..e062dec 100644 --- a/magicka.strings +++ b/magicka.strings @@ -238,3 +238,4 @@ File exists!\r\n \r\n\e[1;37mSearch in (\e[1;32mC\e[1;37m)urrent area or (\e[1;32mA\e[1;37m)ll areas:\e[0m \r\n\e[1;31mPlease enter at least one keyword.\e[0m\r\n \r\n\e[1;37mKeywords:\e[0m +\r\nUsername may not begin or end with a space\r\n diff --git a/src/users.c b/src/users.c index 668d997..cbb56b4 100644 --- a/src/users.c +++ b/src/users.c @@ -557,7 +557,10 @@ struct user_record *new_user() { s_printf(get_string(167)); continue; } - + if (buffer[0] == ' ' || buffer[strlen(buffer) - 1] == ' ') { + s_printf(get_string(240)); + continue; + } for (i=0;i= 97 && tolower(buffer[i]) <= 122) && buffer[i] != 32 && !(buffer[i] >= '0' && buffer[i] <= '9')) { s_printf(get_string(168));