From c3b861b2507dd2ef52802c69a2d737925846e2e0 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 2 Mar 2006 19:34:57 +0000 Subject: Added IS_SINGLE, see comment in include/inspircd.h git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3438 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/inspircd.h | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'include') diff --git a/include/inspircd.h b/include/inspircd.h index 56fe5678b..db30ca7cb 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -57,22 +57,11 @@ // crucial defines #define ETIREDGERBILS EAGAIN -/* -flags for use with WriteMode - -#define WM_AND 1 -#define WM_OR 2 - -flags for use with OnUserPreMessage and OnUserPreNotice - -#define TYPE_USER 1 -#define TYPE_CHANNEL 2 -#define TYPE_SERVER 3 - -#define IS_LOCAL(x) (x->fd > -1) -#define IS_REMOTE(x) (x->fd < 0) -#define IS_MODULE_CREATED(x) (x->fd == FD_MAGIC_NUMBER) -*/ +// This define is used in place of strcmp when we +// want to check if a char* string contains only one +// letter. Pretty fast, its just two compares and an +// addition. +#define IS_SINGLE(x,y) ( (*x == y) && (*(x+1) == 0) ) class serverstats { -- cgit v1.2.3