question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EvMenu custom exit node runs cmd_on_exit twice

See original GitHub issue

Brief summary of issue / Description of requested feature:

On Evennia 0.6 at least, using a custom exit node runs cmd_on_exit twice.

Steps to reproduce the issue / Reasons for adding feature:

Load the following code into @py/edit and execute.

from evennia.utils.evmenu import EvMenu

def start(caller):
    return "Hello world!", {"desc": "Custom exit node", "goto": "exit"}

def exit(caller):
    return None, None

EvMenu(self, {"start": start, "exit": exit}, startnode="start")

Error output / Expected result of feature

Two look commands are run by the character. This does not occur if you use the default quit command.

Extra information, such as Evennia revision/repo/branch, operating system and ideas for how to solve / implement:

My guess is that close_menu() is being hit twice, possibly in evtable_parse_input and EvMenu.goto.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ghostcommented, Oct 5, 2017

I’ll dibs this. It’s probably an unexpected result of the last PR I did on EvMenu. Previously single node EvMenus would bug out. It treats the first node differently to the rest of the nodes and didn’t expect an EvMenu to end on the first node. I suspect my solution to that problem is running close_menu() twice resulting in the doubling up of the cmd_on_exit. It should be a simple fix.

0reactions
texdarkstarcommented, Jan 8, 2018

I do. The above code replicates it for me. I am definitely on the latest evennia.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tips for Running an Exit Node | The Tor Project
Tips for Running an Exit Node · 1. Inform your potential ISP(s) In general, running an exit node from your home Internet connection...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found