]> jfr.im git - irc/evilnet/mod.auth.git/commitdiff
Various fixes for mod.auth... master origin/HEAD origin/master
authorr33d <redacted>
Fri, 11 Mar 2005 03:15:16 +0000 (03:15 +0000)
committerr33d <redacted>
Fri, 11 Mar 2005 03:15:16 +0000 (03:15 +0000)
auth.cc
auth.h
defs.h [deleted file]
defs.h.in [deleted file]

diff --git a/auth.cc b/auth.cc
index b2b6568e077af13aaf290bd5bd2fd33ffd427a43..f9643977a39be234d9db2916ce17ce0ba47ace89 100644 (file)
--- a/auth.cc
+++ b/auth.cc
@@ -54,12 +54,12 @@ auth::auth( const std::string& configFileName )
  : 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()
@@ -91,9 +91,9 @@ if (!validAccount(account)) {
   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;
   }
@@ -124,7 +124,7 @@ void auth::BurstChannels()
 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;
@@ -138,7 +138,7 @@ if (account.empty() || account.size() > maxAccountLen )
 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
diff --git a/auth.h b/auth.h
index 51adfd81e60bde72147680d9b1e1dc8ebe49bb23..61a267d2dc1704bb39cf48b2639f2ec84b000b36 100644 (file)
--- a/auth.h
+++ b/auth.h
@@ -25,6 +25,7 @@
 #include       <string>
 
 #include       "client.h"
+#include       "Network.h"
 
 namespace gnuworld
 {
@@ -40,7 +41,7 @@ public:
        /**
         * Constructor receives a configuration file name.
         */
-       auth( const std::string& ) ;
+       auth( const std::string& configFileName ) ;
 
        /**
         * Destructor does normal stuff.
@@ -84,7 +85,7 @@ protected:
        /**
         * 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.
diff --git a/defs.h b/defs.h
deleted file mode 100644 (file)
index c6cc75f..0000000
--- a/defs.h
+++ /dev/null
@@ -1 +0,0 @@
-/* defs.h.  Generated by configure.  */
diff --git a/defs.h.in b/defs.h.in
deleted file mode 100644 (file)
index e69de29..0000000