00001 /* 00002 * share.h -- part of share.mod 00003 * 00004 * $Id: share.h,v 1.14 2011/02/13 14:19:34 simple Exp $ 00005 */ 00006 /* 00007 * Copyright (C) 1999 - 2011 Eggheads Development Team 00008 * 00009 * This program is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU General Public License 00011 * as published by the Free Software Foundation; either version 2 00012 * of the License, or (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software 00021 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00022 */ 00023 00024 #ifndef _EGG_MOD_SHARE_SHARE_H 00025 #define _EGG_MOD_SHARE_SHARE_H 00026 00027 #define UFF_OVERRIDE 0x000001 /* Override existing bot entries */ 00028 #define UFF_INVITE 0x000002 /* Send invites in user file */ 00029 #define UFF_EXEMPT 0x000004 /* Send exempts in user file */ 00030 /* Currently reserved flags for other modules: 00031 * UFF_COMPRESS 0x000008 Compress the user file 00032 * UFF_ENCRYPT 0x000010 Encrypt the user file 00033 */ 00034 00035 /* Currently used priorities: 00036 * 0 UFF_OVERRIDE 00037 * 0 UFF_INVITE 00038 * 0 UFF_EXEMPT 00039 * 90 UFF_ENCRYPT 00040 * 100 UFF_COMPRESS 00041 */ 00042 00043 typedef struct { 00044 char *feature; /* Name of the feature */ 00045 int flag; /* Flag representing the feature */ 00046 int (*ask_func) (int); /* Pointer to the function that tells us wether 00047 * the feature should be considered as on. */ 00048 int priority; /* Priority with which this entry gets called. */ 00049 int (*snd) (int, char *); /* Called before sending. Handled according to 00050 * `priority'. */ 00051 int (*rcv) (int, char *); /* Called on receive. Handled according to 00052 * `priority'. */ 00053 } uff_table_t; 00054 00055 #ifndef MAKING_SHARE 00056 /* 4 - 7 */ 00057 #define finish_share ((void (*) (int))share_funcs[4]) 00058 #define dump_resync ((void (*) (int))share_funcs[5]) 00059 #define uff_addtable ((void (*) (uff_table_t *))share_funcs[6]) 00060 #define uff_deltable ((void (*) (uff_table_t *))share_funcs[7]) 00061 /* 8 - 11 */ 00062 #endif /* !MAKING_SHARE */ 00063 00064 #endif /* _EGG_MOD_SHARE_SHARE_H */