Merge branch 'development'
[NeonServV5.git] / src / WHOHandler.h
1 /* WHOHandler.h - NeonServ v5.6
2  * Copyright (C) 2011-2012  Philipp Kreil (pk910)
3  * 
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.
8  * 
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.
13  * 
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/>. 
16  */
17 #ifndef _WHOHandler_h
18 #define _WHOHandler_h
19
20 #include "main.h"
21
22 struct ClientSocket;
23 struct ChanNode;
24 struct UserNode;
25
26 #define USERLIST_CALLBACK(NAME) void NAME(UNUSED_ARG(struct ClientSocket *client), UNUSED_ARG(struct ChanNode *chan), UNUSED_ARG(void *data))
27 typedef USERLIST_CALLBACK(userlist_callback_t);
28
29 #define USERAUTH_CALLBACK(NAME) void NAME(UNUSED_ARG(struct ClientSocket *client), UNUSED_ARG(char *user_nick), UNUSED_ARG(struct UserNode *user), UNUSED_ARG(void *data))
30 typedef USERAUTH_CALLBACK(userauth_callback_t);
31
32 #define get_userlist_if_invisible(CHAN, MODID, CALLBACK, DATA) _get_userlist_with_invisible(CHAN, MODID, CALLBACK, DATA, 0)
33 #define get_userlist_with_invisible(CHAN, MODID, CALLBACK, DATA) _get_userlist_with_invisible(CHAN, MODID, CALLBACK, DATA, 1)
34
35 #ifndef DND_FUNCTIONS
36 void clear_whoqueue(struct ClientSocket *client);
37 void recv_whohandler_354(struct ClientSocket *client, char **argv, unsigned int argc);
38 void recv_whohandler_315(struct ClientSocket *client, char **argv, unsigned int argc);
39 /* MODULAR ACCESSIBLE */ void get_userlist(struct ChanNode *chan, int module_id, userlist_callback_t callback, void *data);
40 /* MODULAR ACCESSIBLE */ void _get_userlist_with_invisible(struct ChanNode *chan, int module_id, userlist_callback_t callback, void *data, int force);
41 /* MODULAR ACCESSIBLE */ void get_userauth(struct UserNode *user, int module_id, userauth_callback_t callback, void *data);
42 void free_whoqueue();
43 #endif
44 #endif