Fix a runtime in jobban handling (#18119)

This commit is contained in:
moxian
2022-06-28 11:04:27 +00:00
committed by GitHub
parent 8753e22a8e
commit 244108e921
+14 -12
View File
@@ -747,14 +747,15 @@
msg = job
else
msg += ", [job]"
// Reload their job ban holder (refresh this round)
M.client.jbh.reload_jobbans(M.client)
add_note(M.ckey, "Banned from [msg] - [reason]", null, usr.ckey, 0)
message_admins("<span class='notice'>[key_name_admin(usr)] banned [key_name_admin(M)] from [msg] for [mins] minutes</span>", 1)
to_chat(M, "<span class='warning'><big><b>You have been jobbanned by [usr.client.ckey] from: [msg].</b></big></span>")
to_chat(M, "<span class='danger'>The reason is: [reason]</span>")
to_chat(M, "<span class='warning'>This jobban will be lifted in [mins] minutes.</span>")
// Reload their job ban holder (refresh this round)
if(M.client)
M.client.jbh.reload_jobbans(M.client)
to_chat(M, "<span class='warning'><big><b>You have been jobbanned by [usr.client.ckey] from: [msg].</b></big></span>")
to_chat(M, "<span class='danger'>The reason is: [reason]</span>")
to_chat(M, "<span class='warning'>This jobban will be lifted in [mins] minutes.</span>")
href_list["jobban2"] = 1 // lets it fall through and refresh
return 1
if("No")
@@ -769,14 +770,15 @@
msg = job
else
msg += ", [job]"
// Reload their job ban holder (refresh this round)
M.client.jbh.reload_jobbans(M.client)
add_note(M.ckey, "Banned from [msg] - [reason]", null, usr.ckey, 0)
message_admins("<span class='notice'>[key_name_admin(usr)] banned [key_name_admin(M)] from [msg]</span>", 1)
to_chat(M, "<span class='warning'><big><b>You have been jobbanned by [usr.client.ckey] from: [msg].</b></big></span>")
to_chat(M, "<span class='danger'>The reason is: [reason]</span>")
to_chat(M, "<span class='warning'>Jobban can be lifted only upon request.</span>")
// Reload their job ban holder (refresh this round)
if(M.client)
M.client.jbh.reload_jobbans(M.client)
to_chat(M, "<span class='warning'><big><b>You have been jobbanned by [usr.client.ckey] from: [msg].</b></big></span>")
to_chat(M, "<span class='danger'>The reason is: [reason]</span>")
to_chat(M, "<span class='warning'>Jobban can be lifted only upon request.</span>")
href_list["jobban2"] = 1 // lets it fall through and refresh
return 1
if("Cancel")