Skip to content

Commit

Permalink
bugfix: trim rank name at creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Bizzonium committed Aug 7, 2024
1 parent 3065fcd commit fbcc934
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/modules/admin/topic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
else if(task == "rank")
var/new_rank
if(length(GLOB.admin_ranks))
new_rank = input("Выберите стандартный ранг или создайте новый", "Выбор ранга", null, null) as null|anything in (GLOB.admin_ranks|"*Новый Ранг*")
new_rank = trim(input("Выберите стандартный ранг или создайте новый", "Выбор ранга", null, null) as null|anything in (GLOB.admin_ranks|"*Новый Ранг*"))
else
CRASH("GLOB.admin_ranks is empty, inform coders")

Expand All @@ -306,7 +306,7 @@
switch(new_rank)
if(null,"") return
if("*Новый Ранг*")
new_rank = input("Введите название нового ранга", "Новый Ранг", null, null) as null|text
new_rank = trim(input("Введите название нового ранга", "Новый Ранг", null, null) as null|text)
if(!new_rank)
to_chat(usr, "<font color='red'>Ошибка: Topic 'editrights': Неверный ранг</font>")
return
Expand Down

0 comments on commit fbcc934

Please sign in to comment.