2024-06-19 22:33:28 +07:00

20 lines
529 B
Markdown

# Extension event (XHandler only)
To handle the event can use `on_user()` decorator
This extension have only [XHandler](../../extensions/xhandler.md) and `command` event is not called if enable XHandler
## beforexhandler
Called when user entered command before XHandler command
```py
@ssh.on_user("beforexhandler")
def before(client, command):
# do something
```
## afterxhandler
Called when user entered command after XHandler command
```py
@ssh.on_user("afterxhandler")
def after(client, command):
# do something
```