Changeset - 5a445b490f54
[Not reviewed]
0 1 0
HanzZ - 14 years ago 2011-08-14 21:26:39
hanzz.k@gmail.com
check protocol before connecting user
1 file changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
backends/libpurple/main.cpp
Show inline comments
 
@@ -180,12 +180,17 @@ class SpectrumNetworkPlugin : public NetworkPlugin {
 

	
 
			if (password.empty()) {
 
				np->handleDisconnected(user, name, 0, "Empty password.");
 
				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");
 
				account = purple_accounts_find(name.c_str(), protocol.c_str());
 
// 				User *u = (User *) account->ui_data;
 
// 				if (u && u != user) {
0 comments (0 inline, 0 general)