sort uppercase chars after lowercase chars for !flags

This commit is contained in:
jesopo 2019-09-12 15:00:00 +01:00
parent 5206bf3d47
commit 12fea0a38f

View file

@ -268,7 +268,10 @@ class Module(ModuleManager.BaseModule):
new_flags = list(set(current_flags)-set(parsed_flags)) new_flags = list(set(current_flags)-set(parsed_flags))
if new_flags: if new_flags:
new_flags = sorted(new_flags) # sort alphanumeric with uppercase after lowercase
new_flags = sorted(new_flags,
key=lambda c: ("0" if c.islower() else "1")+c))
new_flags_str = "".join(new_flags) new_flags_str = "".join(new_flags)
event["target"].set_user_setting(target.get_id(), "flags", event["target"].set_user_setting(target.get_id(), "flags",
new_flags_str) new_flags_str)