{"action":"created","issue":{"url":"https://api.github.com/repos/evennia/evennia/issues/974","repository_url":"https://api.github.com/repos/evennia/evennia","labels_url":"https://api.github.com/repos/evennia/evennia/issues/974/labels{/name}","comments_url":"https://api.github.com/repos/evennia/evennia/issues/974/comments","events_url":"https://api.github.com/repos/evennia/evennia/issues/974/events","html_url":"https://github.com/evennia/evennia/issues/974","id":154833528,"number":974,"title":"Small issue with case sensitivity in cmdparser","user":{"login":"TehomCD","id":17857779,"avatar_url":"https://avatars.githubusercontent.com/u/17857779?v=3","gravatar_id":"","url":"https://api.github.com/users/TehomCD","html_url":"https://github.com/TehomCD","followers_url":"https://api.github.com/users/TehomCD/followers","following_url":"https://api.github.com/users/TehomCD/following{/other_user}","gists_url":"https://api.github.com/users/TehomCD/gists{/gist_id}","starred_url":"https://api.github.com/users/TehomCD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TehomCD/subscriptions","organizations_url":"https://api.github.com/users/TehomCD/orgs","repos_url":"https://api.github.com/users/TehomCD/repos","events_url":"https://api.github.com/users/TehomCD/events{/privacy}","received_events_url":"https://api.github.com/users/TehomCD/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/evennia/evennia/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-05-14T04:24:23Z","updated_at":"2016-06-26T02:08:52Z","closed_at":"2016-06-24T21:34:48Z","body":"#### Brief summary of issue / Description of requested feature:\r\n\r\nI had to comment out the following lines in cmdparser in order to have some custom exit commands work in a way players expected:\r\n\r\n    if len(matches) > 1:\r\n        # See if it helps to analyze the match with preserved case but only if\r\n        # it leaves at least one match.\r\n        trimmed = [match for match in matches\r\n                     if raw_string.startswith(match[0])]\r\n        if trimmed:\r\n            matches = trimmed\r\n\r\nTo explain, I had commands that let people lock/unlock/pass through exits, derived from the exit names/aliases, in the same manner that exits do. However, what happens when an exit is named something like 'Plaza (PL)' with 'PL' as an alias? aliases and keys are made lower() by the command meta class, but then the above attempts to trim results based on case sensitivity. So all works fine if a player does 'pass pl', for example, but if they do 'pass PL', the case sensitivity check will eliminate that choice, and instead match 'p' for page.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/evennia/evennia/issues/comments/228580240","html_url":"https://github.com/evennia/evennia/issues/974#issuecomment-228580240","issue_url":"https://api.github.com/repos/evennia/evennia/issues/974","id":228580240,"user":{"login":"TehomCD","id":17857779,"avatar_url":"https://avatars.githubusercontent.com/u/17857779?v=3","gravatar_id":"","url":"https://api.github.com/users/TehomCD","html_url":"https://github.com/TehomCD","followers_url":"https://api.github.com/users/TehomCD/followers","following_url":"https://api.github.com/users/TehomCD/following{/other_user}","gists_url":"https://api.github.com/users/TehomCD/gists{/gist_id}","starred_url":"https://api.github.com/users/TehomCD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TehomCD/subscriptions","organizations_url":"https://api.github.com/users/TehomCD/orgs","repos_url":"https://api.github.com/users/TehomCD/repos","events_url":"https://api.github.com/users/TehomCD/events{/privacy}","received_events_url":"https://api.github.com/users/TehomCD/received_events","type":"User","site_admin":false},"created_at":"2016-06-26T02:08:52Z","updated_at":"2016-06-26T02:08:52Z","body":"If I remember right, the issue might be if the command contained case-sensitive characters at the end rather than the beginning. The example command I gave was 'pass PL', and the quoted text checks starts_with for trimming matches, which may have been what caused the mismatch for me. You might have to create an exit or command that's more than one word with uppercase at the end to duplicate it. Does the vanilla exit command allow for multiple words in it? If so, you might be able to create something like 'plaza CAPS' as a test case or something."}}
{"actor":{"display_login":"TehomCD"}}