Commit Graph

5 Commits

Author SHA1 Message Date
Guangcong Luo
1427871a09 Refactor Messages
PMs no longer special-case commands. The implementation of /invite,
/me, etc in commands have been fully moved from messages.js back to
commands.js and the rest. This makes Messages command support a lot
closer to how CommandParser itself handles commands; the two files
should be mergeable soon.

/me has been refactored, and now supports /ME, /me's, etc in PMs and
regular chat exactly the same way.

context.pmTarget is now guaranteed to be `User|undefined`, rather than
its previous specification of `User|string|undefined`. The previous
use-case of putting a string in context.pmTarget was to support
errorReply when PMing a nonexistent user, but special-casing that
case is easier than having to support a possible string pmTarget
everywhere.
2016-09-24 23:14:16 -07:00
panpawn
abcec6e363 Don't allow users to PM broadcast themselves cmds (#2770)
When this happens, the command acts like it gets sent twice... there's also no purpose when PMing yourself to have to broadcast the command.
2016-09-21 22:26:27 -05:00
Ivo Julca
8623276dbf
Improve command recognition in PMs 2016-09-19 11:18:32 -05:00
Guangcong Luo
31768c40c9 Fix /ignore message in PMs 2016-09-17 08:13:59 -07:00
Guangcong Luo
de524c1a26 Add experimental support for commands in PMs
This is very experimental. Please don't base chat plugin code on it
until it stabilizes.
2016-09-15 22:12:23 -07:00