check protocol before connecting user
This commit is contained in:
parent
717ee40df7
commit
5a445b490f
1 changed files with 5 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Reference in a new issue