Detect rcon, consol or chat command

Is there a way for the plugin to check wether a command is typed in chat, in consol or by rcon ?