hey, for a command queue i need do differ send requests from user command and send(), so a user command event would be nice, or a way to bypass SysDataSendRequest.
regards, Avaloniac.
[Feature Request] SysDataUserCommandRequestEvent
Re: [Feature Request] SysDataUserCommandRequestEvent
Could you not override the send function so that it toggled a flag for use with SysDataSendRequest?
eg:
Or am I misinterpreting your request?
eg:
Putting in another event is of course possible, but you can work around the lack, can't you? You could also work around it by having an alias (.+) that captures anything that the user tries to send.
Or am I misinterpreting your request?
Re: [Feature Request] SysDataUserCommandRequestEvent
I believe the new function suggestion is the best way to go. If you want to overwrite the current send, I would recommend this method:
Re: [Feature Request] SysDataUserCommandRequestEvent
One addendum to Oneymus' code though - make sure you don't run that code twice! Every time you run that code, you're wrapping send in an additional function, which will slow things down.
Also, send() can take a second parameter, so you might want to pass that through as well (if you ever want to do hidden sends).
Also, send() can take a second parameter, so you might want to pass that through as well (if you ever want to do hidden sends).
Re: [Feature Request] SysDataUserCommandRequestEvent
... and all in all, be careful when tinkering with send(), a lot of scripts use that so if you mess it up, things can break (until you restart Mudlet anyway). This is one feature in Lua that's extremely powerful but you want to have some knowledge when fiddling with it