I'm trying to build a database that keep tracks of all the private messages that are sent from one user to another. I tried looking at the PluginPigLatin example, but it only deals with Public messages. And then I looked at the PluginPrivateMessage example, and it tells me to override the request(). How do I know when the client is sending a private message? The client could be sending a different type of request like maybe login request? Should I need to set up some protocol of my own so it can parse through the type of request the user is actually sending?
So in the request(), i'll have several case statement and dispatch the particular task based on the request. Does this work? Or am I thinking it all wrong?