Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

nickserv.h

Go to the documentation of this file.
00001 
00014 /*
00015  * Copyright (c) 1996-1997 Chip Norkus
00016  * Copyright (c) 1997 Max Byrd
00017  * Copyright (c) 1997 Greg Poma
00018  * Copyright (c) 2001 James Hess
00019  * All rights reserved.
00020  *
00021  * Redistribution and use in source and binary forms, with or without
00022  * modification, are permitted provided that the following conditions
00023  * are met:
00024  * 1. Redistributions of source code must retain the above copyright
00025  *    notice, this list of conditions and the following disclaimer.
00026  * 2. Redistributions in binary form must reproduce the above copyright
00027  *    notice, this list of conditions and the following disclaimer in the
00028  *    documentation and/or other materials provided with the distribution.
00029  * 3. Neither the name of the authors nor the names of its contributors
00030  *    may be used to endorse or promote products derived from this software
00031  *    without specific prior written permission.
00032  *
00033  * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
00034  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00035  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00036  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
00037  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00038  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00039  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00040  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00041  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00042  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00043  * SUCH DAMAGE.
00044  */
00045 
00046 #ifndef __NICKSERV_H
00047 #define __NICKSERV_H
00048 #include "queue.h"
00049 #include "memoserv.h"
00050 #include "string.h"
00051 #include "struct.h"
00052 
00053 void addGhost(char *);
00054 void delGhost(char *);
00055 void delTimedGhost(char *);
00056 
00057 
00058 /* online flags: */
00059 #define NISOPER   0x0001    
00060 #define NISAWAY   0x0002    
00061 #define NISHELPOP 0x0004    
00062 #define NISONLINE 0x0008    
00063 #define NISAHURT  0x0010    
00064 #define NOISMASK  0x0020    
00065 
00066 #define NCNICK    0x1000    
00067 
00068 /* nickname flag slots, 5 open */
00069 #define NKILL        0x00001 
00070 #define NVACATION    0x00002 
00071 #define NHOLD        0x00004 
00072 #define NIDENT       0x00008 
00073 #define NTERSE       0x00010 
00074 /* defines if a user can be added to channel op lists */
00075 #define NOADDOP      0x00040 
00076 #define NEMAIL       0x00080 
00077 #define NBANISH      0x00100 
00078 #define NGRPOP       0x00200 
00079 #define NBYPASS      0x00400 
00080 #define NUSEDPW      0x00800 
00081 #define NDBISMASK    0x01000 
00082 #define NMARK        0x02000 
00083 #define NDOEDIT      0x04000 
00084 #define NOSENDPASS   0x08000 
00085 #define NACTIVE      0x10000 
00086 #define NDEACC       0x20000 
00087 #define NFORCEXFER   0x40000 
00088 
00089 #define NENCRYPT     0x80000 
00090 #define NAHURT       0x100000 
00091 
00092 /* users opflags */
00093 #define OROOT     0x000001  
00094 #define OREMROOT  0x000002  
00095 #define OADMIN    0x000004  
00096 #define OSERVOP   0x000008  
00097 #define OOPER     0x000010  
00098 #define ORAKILL   0x000020  
00099 #define OAKILL    0x000040  
00100 #define OINFOPOST 0x000080  
00101 #define OSETOP    0x000100  
00102 #define OSETFLAG  0x000200  
00103 #define ONBANDEL  0x000400  
00104 #define OCBANDEL  0x000800  
00105 #define OIGNORE   0x001000  
00106 #define OGRP      0x002000  
00107 #define ORAW      0x004000      
00108 #define OJUPE     0x008000  
00109 #define OLIST     0x010000  
00110 #define OCLONE    0x020000  
00111 #define OPROT     0x080000  
00112 #define OACC      0x100000  
00113 #define OHELPOP   0x200000  
00114 #define ODMOD     0x400000  
00115 #define OAHURT    0x800000  
00116 #define OVERRIDE  OACC      
00118 
00119 #define OPFLAG_DEFAULT  (OOPER|ORAKILL|OINFOPOST|OACC)
00120 
00122 #define OPFLAG_ADMIN    (OADMIN|OOPER|OSERVOP|OAKILL|OINFOPOST|OSETOP| \
00123                          OIGNORE|OPROT|OACC)
00124 
00125 #define OPFLAG_PLUS ((~0) & ~(OPFLAG_MINUS))
00126 
00128 #define OPFLAG_MINUS    (0)
00129 
00131 #define OPFLAG_ROOTSET  (OADMIN|OSERVOP|OGRP|ORAW|OJUPE|OLIST|OSETOP|OSETFLAG| \
00132                          ONBANDEL|OCBANDEL|OIGNORE|OAKILL|OCLONE|OPROT|ODMOD|OAHURT)
00133 
00135 #define OPFLAG_ROOT (OPFLAG_PLUS|OROOT)
00136 
00137 
00138 /*
00139  * functions
00140  */
00141 void        setIdentify(UserList *, RegNickList *);
00142 void        clearIdentify(UserList *);
00143 int     isIdentified(UserList *, RegNickList *);
00144 int     isRecognized(UserList *, RegNickList *);
00145 int             isOper(UserList *);
00146 int             isRoot(UserList *);
00147 int             issRoot(UserList *);
00148 int             isGRPop(UserList *);
00149 int     opFlagged(UserList *, flag_t);
00150 flag_t      getOpFlags(UserList *);
00151 int     canAkill(UserList *);
00152 int             isServop(UserList *);
00153 int             checkAccess(char *, char *, RegNickList *);
00154 int             isGhost(char *);
00155 int             addFlood(UserList *, int);
00156 int     addNReg(char *);
00157 int     addAccItem(RegNickList *, char *);
00158 int     delAccItem(RegNickList *, char *, char *);
00159 void            addNewUser(char **, int);
00160 void            remUser(char *, int ignoreDesync);
00161 void        addGhost(char *);
00162 void            sendToNickServ(UserList *, char **, int);
00163 void            setMode(char *, char *);
00164 void            changeNick(char *, char *, char *);
00165 void            nDesynch(char *, char *);
00166 void        addNick(UserList *);
00167 void        addRegNick(RegNickList *);
00168 void        delNick(UserList *);
00169 void        delRegNick(RegNickList *);
00170 void            setFlags(char *, int, char);
00171 void            addAccessMask(char *, UserList *);
00172 void            delAccessMask(char *, UserList *);
00173 void        delNReg(char *);
00174 void        initNickData(RegNickList *);
00175 void            delGhost(char *);
00176 void        syncNickData(time_t);
00177 UserList       *getNickData(char *);
00178 RegNickList    *getRegNickData(const char *);
00179 void        addOpData(RegNickList *);
00180 void        delOpData(RegNickList *);
00181 char           *regnick_ugethost(UserList *, RegNickList *, int sM = 1);
00182 
00183 /*
00184  * semi-global variables
00185  */
00186 /* None left */
00187 #endif /* __NICKSERV_H */

Generated at Sat Oct 25 20:56:09 2003 for Services using Doxygen.
Services Copyr. 1996-2001 Chip Norkus, Max Byrd, Greg Poma, Michael Graff, James Hess, Dafydd James. All rights reserved See LICENSE for licensing information.