1 /* ChanUser.h - NeonServ v5.1
2 * Copyright (C) 2011 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/>.
21 #define CHANUSERFLAG_OPPED 0x01
22 #define CHANUSERFLAG_VOICED 0x02
23 #define CHANUSERFLAG_INVISIBLE 0x04
25 #define CHANUSERFLAG_OPPED_OR_VOICED (CHANUSERFLAG_OPPED | CHANUSERFLAG_VOICED)
33 struct ChanNode *chan;
34 struct UserNode *user;
39 struct NeonSpamNode *spamnode;
41 struct ChanUser *next_user;
42 struct ChanUser *next_chan;
45 struct ChanUser* addChanUser(struct ChanNode *chan, struct UserNode *user);
46 struct ChanUser* addInvisibleChanUser(struct ChanNode *chan, struct UserNode *user);
47 int isUserOnChan(struct UserNode *user, struct ChanNode *chan);
48 struct ChanUser* getChanUser(struct UserNode *user, struct ChanNode *chan);
49 struct ChanUser* getChannelUsers(struct ChanNode *chan, struct ChanUser *last);
50 struct ChanUser* getUserChannels(struct UserNode *user, struct ChanUser *last);
51 void delChanUser(struct ChanUser *chanuser, int freeChanUser);
52 void removeChanUserFromLists(struct ChanUser *chanuser, int remove_from_userlist, int remove_from_channellist, int freeChanUser);