1 /* DBHelper.h - NeonServ v5.6
2 * Copyright (C) 2011-2012 Philipp Kreil (pk910)
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 #define DB_CHANUSER_SUSPENDED 0x01
25 #define DB_CHANUSER_AUTOINVITE 0x02
26 #define DB_CHANUSER_NOAUTOOP 0x04
28 #define loadUserSettings(USER) if((USER->flags & USERFLAG_ISAUTHED) && !(USER->flags & USERFLAG_LOADED_SETTINGS)) _loadUserSettings(USER)
29 #define loadChannelSettings(CHAN) if(!(CHAN->flags & CHANFLAG_REQUESTED_CHANINFO)) _loadChannelSettings(CHAN)
32 /* MODULAR ACCESSIBLE */ void _loadUserSettings(struct UserNode* user);
33 /* MODULAR ACCESSIBLE */ int isGodMode(struct UserNode *user);
34 /* MODULAR ACCESSIBLE */ char *getChanDefault(char *channel_setting);
35 /* MODULAR ACCESSIBLE */ int getChannelAccess(struct UserNode *user, struct ChanNode *chan);
36 /* MODULAR ACCESSIBLE */ int checkChannelAccess(struct UserNode *user, struct ChanNode *chan, char *channel_setting, int allow_501);
37 /* MODULAR ACCESSIBLE */ void _loadChannelSettings(struct ChanNode *chan);
39 /* MODULAR ACCESSIBLE */ int isUserProtected(struct ChanNode *chan, struct UserNode *victim, struct UserNode *issuer);
41 /* MODULAR ACCESSIBLE */ char *getBanAffectingMask(struct ChanNode *chan, char *mask); //returns bans that match a given mask eg. *!*@ab* if you pass *!*@abcdefg.*
43 /* MODULAR ACCESSIBLE */ int renameAccount(char *oldauth, char *newauth);
45 /* MODULAR ACCESSIBLE */ void deleteUser(int userid);