Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

De-duplicate comand parsing code #10

Merged
merged 1 commit into from
Mar 2, 2013
Merged

De-duplicate comand parsing code #10

merged 1 commit into from
Mar 2, 2013

Conversation

eponymous
Copy link
Contributor

Removes some duplicated code and uses only parse_input() to parse the command input.

Note: not sure if "@@ foo" is meant to be supported in all windows so left the code checking for that where it was in gamewin.c.

@ghost ghost assigned pjbroad Mar 2, 2013
@pjbroad
Copy link
Collaborator

pjbroad commented Mar 2, 2013

Thanks, I can't see why "@@ foo" should not be in parse_input too. I'll investigate a bit more and make that change too.

pjbroad added a commit that referenced this pull request Mar 2, 2013
De-duplicate comand parsing code
@pjbroad pjbroad merged commit 2798350 into raduprv:master Mar 2, 2013
@pjbroad
Copy link
Collaborator

pjbroad commented Mar 2, 2013

Looks like that code is never reached anyway unless we have lost the input widget. The common parse_input() function is used in the root_key_to_input_field() call at the top of the function. The additional check for "@@" just switches your default channel to the one specified then sends the text. IMHO, I'd rather the default channel was left as it was if I'm using "@@". Otherwise, I'd just switch default channels and use "@". I'm thinking to just remove that code....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants