Search in Openfire

Is it possible to modify the code for the search plugin for Openfire to handle searches based on the status of user? The application that we are working on need a way to look for users that are “available for chat”. Maybe using the status of a user isn’t the best way to handle this, if so, anyone got any good suggestions?

Thanks

Search Plugin use UserProvider to do search. We can change the search parameters by implementing own UserProvider iterface in own class and overriding the following methods:

getSearchFields()

findUsers(Set<String> fields, String query,int startIndex, int numResults)

findUsers(Set<String> fields, String query)