Replying to offline players
Steps to reproduce
The steps are:
- message someone (using
- get them to leave the server;
- use the reply command
When following the steps above, replying as in step 3 functions as if the target player is online, that is, it sends the sender a message of the form
me -> <target player> <message>.
This has been tested as PluginDev on virtually all servers (I don't think this is important) with a Member as target.
Ideally the sender would receive a message similar to "So-and-so isn't online right now." instead of the message described above. While the current behaviour isn't very problematic, it could lead to confusion when someone doesn't know the person they are replying to, disconnected.
After a brief glance at the code, the issue seems to stem from this line. This check is effectively the same as the one above. I'm not sure what the intended behaviour is: clear the reply target whenever the sender/target leave, or check for online status. I'm also not sure which option is better. On one hand, it is convenient to keep a reply target if you or they disconnect for a little while (e.g. Internet connection outage). On the other hand, it is maybe a bit wasteful and not at all practical, to store all reply targets indefinitely (maybe clear old entries every once in a while?).