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

chanserv.h

Go to the documentation of this file.
00001  /* $Id: chanserv.h,v 1.1.1.1 2003/07/04 02:51:49 Mysid Exp $ */
00002 
00003 /*
00004  * Copyright (c) 1996-1997 Chip Norkus
00005  * Copyright (c) 1997 Max Byrd
00006  * Copyright (c) 1997 Greg Poma
00007  * All rights reserved.
00008  *
00009  * Redistribution and use in source and binary forms, with or without
00010  * modification, are permitted provided that the following conditions
00011  * are met:
00012  * 1. Redistributions of source code must retain the above copyright
00013  *    notice, this list of conditions and the following disclaimer.
00014  * 2. Redistributions in binary form must reproduce the above copyright
00015  *    notice, this list of conditions and the following disclaimer in the
00016  *    documentation and/or other materials provided with the distribution.
00017  * 3. Neither the name of the authors nor the names of its contributors
00018  *    may be used to endorse or promote products derived from this software
00019  *    without specific prior written permission.
00020  *
00021  * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
00022  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00023  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00024  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
00025  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00026  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00027  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00028  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00029  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00030  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00031  * SUCH DAMAGE.
00032  */
00033 
00039 #ifndef __CHANSERV_H
00040 #define __CHANSERV_H
00041 
00045 #define HELPOPS_CHAN "#helpops"
00046 
00047 /************************************************************************/
00048 
00049 /* mode flags */
00050 #define PM_MASK 0x00f000ff  
00051 #define PM_I    0x00000001  
00052 #define PM_K    0x00000002  
00053 #define PM_L    0x00000004  
00054 #define PM_M    0x00000008  
00055 #define PM_N    0x00000010  
00056 #define PM_P    0x00000020  
00057 #define PM_S    0x00000040  
00058 #define PM_T    0x00000080  
00059 #define MM_MASK 0x000fff00  
00060 #define MM_I    0x00000100  
00061 #define MM_K    0x00000200  
00062 #define MM_L    0x00000400  
00063 #define MM_M    0x00000800  
00064 #define MM_N    0x00001000  
00065 #define MM_P    0x00002000  
00066 #define MM_S    0x00004000  
00067 #define MM_T    0x00008000  
00068 
00069 #define MM_H    0x00010000
00070 #define MM_C    0x00020000
00071 #define PM_H    0x00100000
00072 #define PM_C    0x00200000
00073 
00074 /************************************************************************/
00075 
00076 /* Channel flags */
00077 #define COPGUARD    0x00000001  
00078 #define CKTOPIC     0x00000002  
00079 #define CLEAVEOPS   0x00000004  
00080 #define CQUIET      0x00000008  
00081 #define CCSJOIN     0x00000010  
00082 
00083 
00084 #define CIDENT      0x00000020  
00085 #define CHOLD       0x00000040  
00086 #define CREG        0x00000080  
00087 #define CBANISH     0x00000100  
00088 #define CPROTOP     0x00000200  
00089 #define CMARK       0x00000400  
00090 #define CCLOSE      0x00000800  
00091 #define CFORCEXFER  0x00001000  
00092 
00093 #define CENCRYPT    0x00002000  
00094 
00095 /************************************************************************/
00096 
00097 /*
00098  * op levels.
00099  *
00100  * Anything named OPxx is an open field.
00101  * feel free to fill open fields with whatever you want
00102  * For more information, see docs/levelscheme.
00103  */
00104 #define OPNONE       0          
00105 #define OP1          1          
00106 #define OP2          2          
00107 #define MAOP         3          
00108 #define OP4          4          
00109 #define AOP          5          
00110 #define OP6          6          
00111 #define OP7          7          
00112 #define MSOP         8          
00113 #define OP9          9          
00114 #define SOP         10          
00115 #define OP11        11          
00116 #define OP12        12          
00117 #define MFOUNDER    13          
00118 #define OP14        14          
00119 #define FOUNDER     15          
00120 
00121 /************************************************************************/
00122 
00123 #define CHANOP 0x0001           
00124 #define CHANVOICE 0x0002        
00125 
00126 
00127 
00128 void sendToChanServ(UserList *, char **, int);
00129 void addUserToChan(UserList *, char *);
00130 void remUserFromChan(UserList *, char *);
00131 void remFromAllChans(UserList *);
00132 void changeNickOnAllChans(UserList *, UserList *);
00133 void setChanMode(char **, int);
00134 void setChanTopic(char **, int);
00135 void sendToChanOps(ChanList *, char *,...);
00136 void sendToChanOpsAlways(ChanList *, char *,...);
00137 void addChan(ChanList *);
00138 void delChan(ChanList *);
00139 void addRegChan(RegChanList *);
00140 void delRegChan(RegChanList *);
00141 void addChanAkick(RegChanList *, cAkickList *);
00142 void delChanAkick(RegChanList *, cAkickList *);
00143 void addChanOp(RegChanList *, cAccessList *);
00144 void delChanOp(RegChanList *, cAccessList *);
00145 void initRegChanData(RegChanList *);
00146 void addChanUser(ChanList *, cNickList *);
00147 void delChanUser(ChanList *, cNickList *, int);
00148 void addChanBan(ChanList *, cBanList *);
00149 void delChanBan(ChanList *, cBanList *);
00150 ChanList *getChanData(char *);
00151 RegChanList *getRegChanData(char *);
00152 cNickList *getChanUserData(ChanList *, UserList *);
00153 cBanList *getChanBan(ChanList *, char *);
00154 int getChanOp(RegChanList *, char *);
00155 cAccessList *getChanOpData(const RegChanList *, const char *);
00156 cAkickList *getChanAKick(RegChanList *, char *);
00157 void syncChanData(time_t);
00158 cAkickList *getChanAkick(RegChanList *, char *);
00159 void freeRegChan(RegChanList *);
00160 void indexAkickItems(RegChanList *);
00161 void indexOpItems(RegChanList *);
00162 int isFounder(RegChanList *, UserList *);
00163 void makeModeLockStr(RegChanList *, char *);
00164 char *initModeStr(char *chan);
00165 void banKick(ChanList *, UserList *, char *, ...);
00166 void rshift_argv(char **args, int x, int numargs);
00167 
00168 #endif /* __CHANSERV_H */

Generated at Sat Oct 25 20:56:07 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.