check protocol before connecting user

This commit is contained in:
HanzZ 2011-08-14 21:26:39 +02:00
parent 717ee40df7
commit 5a445b490f

View file

@ -183,6 +183,11 @@ class SpectrumNetworkPlugin : public NetworkPlugin {
return;
}
if (!purple_find_prpl(protocol.c_str())) {
np->handleDisconnected(user, name, 0, "Invalid protocol " + protocol);
return;
}
LOG4CXX_INFO(logger, "Creating account with name '" << name.c_str() << "' and protocol '" << protocol << "'");
if (purple_accounts_find(name.c_str(), protocol.c_str()) != NULL){
// Log(user, "this account already exists");