diff options
| author | 2019-09-12 15:00:00 +0100 | |
|---|---|---|
| committer | 2019-09-12 15:00:00 +0100 | |
| commit | 12fea0a38f3dad819d43281a2ce6b269ffbdd378 (patch) | |
| tree | 0ad170aa4a259b4cfb578ed48022aad62da185ed | |
| parent | remove auto_mode.py, it has been superseded by !flags (diff) | |
| signature | ||
sort uppercase chars after lowercase chars for !flags
| -rw-r--r-- | modules/channel_op.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/channel_op.py b/modules/channel_op.py index c9f9d2c9..99cf1ba7 100644 --- a/modules/channel_op.py +++ b/modules/channel_op.py @@ -268,7 +268,10 @@ class Module(ModuleManager.BaseModule): new_flags = list(set(current_flags)-set(parsed_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) event["target"].set_user_setting(target.get_id(), "flags", new_flags_str) |
