So, years ago I wrote some ShadowIRC plug-ins which implemented
new /foo commands, and was irritated that setting the
pCommandDataRec.dontProcess flag and returning true when
passed pUserCommandMessage had no apparent effect -
commands were passed to the server anyway.
The other day I wrote a ShadowIRC plug-in which implements new /
foo commands, and had the same niggle.
This patch fixes this behaviour. If a plug-in sets
pCommandDataRec.dontProcess when passed
pUserCommandMessage, this is detected, as before, in
TranslateCommand(). The diff causes the flag's value to be passed
to the caller, HandleCommand(), which will not pass the command
to the server (or display the "You are not connected to a server"
message) if it is non-zero.
An alternative, shorter but arguably uglier method, would be for
TranslateCommand() to set the len field of its LongString *s
parameter to 0 if a plug-in sets pCommandDataRec.dontProcess;
HandleCommand()s existing implementation would then do the Right
The nomenclature and distribution of work could perhaps be