There appear to be some misconceptions about what is possible for scripts to do regarding monitoring of messages between avatars, and what they are allowed to do under the SL Terms of Service (ToS). To start with, there is no capability in LSL to allow a script to receive IMs. Scripts can send IMs under their own names (which can be changed to spoof an avatar name) but unlike regular IMs, IMs from objects will always be displayed in "nearby chat" rather than their own tabs or windows. Clicking on the "sender name" of such an IM will show where the object is, and who its owner is. Scripts cannot monitor IMs sent to another user either.
There are products available that claim to monitor IMs. What these product actually do is use RLV to prevent the exchange of "normal" IMs, and then provide an alternative messaging method that they can monitor. It isn't possible to covertly monitor regular IMs1.
Scripts can hear local chat, as well as messages on private chat channels (these are not IMs, but things like the Mesmerizer's channel 99 command channel). The SL Community Standards document (which is incorporated into the SL ToS) says: "Remotely monitoring conversations in Second Life, posting conversation logs, or sharing conversation logs without the participants' consent
are all prohibited". This clearly prohibits monitoring someone's chat without their consent unless you are physically within earshot.
As with similar products, and in accordance with the ToS, the CSD NCH will only relay chat spoken by the wearer - it will not relay nearby chat spoken by others. The assumption is that if you wear the device, you have implicitly given consent for it to monitor your chat, but you can't give consent on behalf of anyone else.
1 - While LSL scripts cannot monitor IMs, a hacked viewer could potentially do this, as well as many far more unpleasant things. Make sure that you obtain your viewer from a genuine download location.