summaryrefslogtreecommitdiff
path: root/src/message.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-10 18:04:19 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-10 18:04:19 +0000
commitfd2eb26472bcc0b7b144f40523ff820cba82f574 (patch)
tree367926c5a429de9eca5db303c8d12d146fa8c6c8 /src/message.cpp
parentafa1ec0e9586d93482b5dfdc2d77e93c9499ea10 (diff)
Move IsNick, IsIdent into class InspIRCd, update modules that use it.
Change message.h to just a #warning saying its deprecated, and remove all use of it from the core :) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4847 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/message.cpp')
-rw-r--r--src/message.cpp84
1 files changed, 0 insertions, 84 deletions
diff --git a/src/message.cpp b/src/message.cpp
index 7a1811a63..09385df22 100644
--- a/src/message.cpp
+++ b/src/message.cpp
@@ -13,87 +13,3 @@
*
* ---------------------------------------------------
*/
-
-using namespace std;
-
-#include "inspircd_config.h"
-#include "inspircd.h"
-#include "configreader.h"
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/errno.h>
-#include <sys/utsname.h>
-#include <time.h>
-#include <string>
-#include <ext/hash_map>
-#include <map>
-#include <sstream>
-#include <vector>
-#include <deque>
-#include "users.h"
-#include "ctables.h"
-#include "globals.h"
-#include "modules.h"
-#include "dynamic.h"
-#include "wildcard.h"
-#include "commands.h"
-#include "message.h"
-#include "inspstring.h"
-#include "dns.h"
-#include "helperfuncs.h"
-
-extern int MODCOUNT;
-extern std::vector<Module*> modules;
-extern std::vector<ircd_module*> factory;
-extern time_t TIME;
-extern InspIRCd* ServerInstance;
-
-/* verify that a user's ident and nickname is valid */
-
-int isident(const char* n)
-{
- if (!n || !*n)
- {
- return 0;
- }
- for (char* i = (char*)n; *i; i++)
- {
- if ((*i >= 'A') && (*i <= '}'))
- {
- continue;
- }
- if (((*i >= '0') && (*i <= '9')) || (*i == '-') || (*i == '.'))
- {
- continue;
- }
- return 0;
- }
- return 1;
-}
-
-
-int isnick(const char* n)
-{
- if (!n || !*n)
- {
- return 0;
- }
- int p = 0;
- for (char* i = (char*)n; *i; i++, p++)
- {
- /* "A"-"}" can occur anywhere in a nickname */
- if ((*i >= 'A') && (*i <= '}'))
- {
- continue;
- }
- /* "0"-"9", "-" can occur anywhere BUT the first char of a nickname */
- if ((((*i >= '0') && (*i <= '9')) || (*i == '-')) && (i > n))
- {
- continue;
- }
- /* invalid character! abort */
- return 0;
- }
- return (p < NICKMAX - 1);
-}
-