Well, I don't care about speedwalks (it is about the only MUSHclient feature I don't use at all), so that's fine with me. The issue with using the OnPluginSen(d|t) callback isn't as useful for a few reasons:
1) You'd need to use a plugin and can not use the function in your worlds triggers.
2) The code to deal with this would be spread out over the place where you call it and the place where you 'reject' it.
2a) With OnPluginSend, you may run into the issue that some function tries to execute another tell (if I haven't taken medicine, tell my doctor that I may get ill some time today). This one will always go through, which might not be acceptable when you are using OnPluginSent to stop certain actions. (Okay, it is a weird example situation and I can't think of a better one right this moment, but I have the feeling it is a restriction which I would rather quickly run into, knowing my insane usage of OnPluginSent). This would only handle blocking of messages by -this- plugin, and not by others.
2b) With OnPluginSent, you could only react to allowed actions.. and not to actions that aren't allowed.
2c) 2a and 2b mean that the only conceivable way of using it would be a timer with a very short interval, which has the disadvantage of needing timers enabled AND being unable to send things in one trigger dependant on the result of another, unless daisy-chaining (which would be a very ugly solution imho.)
3) Every plugin-author would have to re-invent this particular system to be able to use it. Or require a certain basic plugin to be available, which in turn would call an alias or method using CallPlugin().
4) If you only want to know whether a certain text could be sent in a certain situation (e.g. aliases a1, a2, a3 all Send() the same thing, but a3 checks whether it was sent), this could possibly confuse the script and needs extra flags to be passed and reset. Not impossible, but not a clean solution either. *forgot this originally, added with edit*
How about adding said check and return value to the SendSpecial (with Immediate=True) and SendImmediate functions then? For others, just return eOK since it is a technical impossibility to return it at that point, if I understand properly. |