: xClient( configFileName )
{
/* Load the config file */
-EConfig authConfig(confFileName);
+EConfig authConfig(configFileName);
/* Load any settings we have */
-maxAccountLen = ::atoi(authConfig.Require("maxAccounLen")->second.c_str());
-operOnly = ::atoi(authConfig->Require("operOnly")->second.c_str());
-secureOnly = ::atoi(authConfig->Require("secureOnly")->second.c_str());
+maxAccountLen = ::atoi(authConfig.Require("maxAccountLen")->second.c_str());
+operOnly = ::atoi(authConfig.Require("operOnly")->second.c_str());
+secureOnly = ::atoi(authConfig.Require("secureOnly")->second.c_str());
}
auth::~auth()
Notice(theClient, "%s is not a valid account name.", account.c_str());
return;
}
+iClient* receiver = NULL;
if (st.size() > 1) {
- iClient* receiver = Network->findNick(st[1]);
- if (!receiver) {
+ if (!(receiver = Network->findNick(st[1]))) {
Notice(theClient, "Unable to find nickname %s", st[1].c_str());
return;
}
xClient::BurstChannels();
}
-bool auth::validAccount(const string& account) const
+bool auth::validAccount(const std::string& account) const
{
if (account.empty() || account.size() > maxAccountLen )
return false;
if (isdigit(account[0]))
return false;
-for ( string::const_iterator sItr = account.begin();
+for ( std::string::const_iterator sItr = account.begin();
sItr != account.end() ; ++sItr ) {
if ( *sItr >= 'A' && *sItr <= '}' )
// ok
#include <string>
#include "client.h"
+#include "Network.h"
namespace gnuworld
{
/**
* Constructor receives a configuration file name.
*/
- auth( const std::string& ) ;
+ auth( const std::string& configFileName ) ;
/**
* Destructor does normal stuff.
/**
* Whether or not to restrict the service to opers only.
*/
- bool opersOnly ;
+ bool operOnly ;
/**
* Whether or not to require the use of the secure message type.