]> jfr.im git - irc/quakenet/newserv.git/blame - localuser/localuserchannel.h
r645@blue (orig r493): slug | 2006-05-15 23:31:10 +0100
[irc/quakenet/newserv.git] / localuser / localuserchannel.h
CommitLineData
c86edd1d
Q
1#ifndef __LOCALUSERCHANNEL_H
2#define __LOCALUSERCHANNEL_H
3
4#include "localuser.h"
5#include "../channel/channel.h"
6#include "../irc/irc_config.h"
7
8#define MC_OP 0x0001
9#define MC_VOICE 0x0002
10#define MC_DEOP 0x0004
11#define MC_DEVOICE 0x0008
12
13#define MCB_ADD 0x0001
14#define MCB_DEL 0x0002
15
16typedef struct modechanges {
17 channel *cp;
18 nick *source;
19 int changecount;
20 flag_t addflags;
21 flag_t delflags;
22 sstring *key;
23 unsigned int limit;
24 struct {
25 sstring *str;
26 short dir;
27 char flag;
28 } changes[MAXMODEARGS];
29} modechanges;
30
31/* These functions are in localuserchannel.c */
32int localjoinchannel(nick *np, channel *cp);
33int localpartchannel(nick *np, channel *cp);
34int localcreatechannel(nick *np, char *channame);
35int localgetops(nick *np, channel *cp);
36int localgetvoice(nick *np, channel *cp);
37int localsetmodes(nick *np, channel *cp, nick *target, short modes);
38void localsettopic(nick *np, channel *cp, char *topic);
39void localkickuser(nick *np, channel *cp, nick *target, const char *message);
40void localusermodechange(nick *np, channel *cp, char *modes);
41void sendmessagetochannel(nick *source, channel *cp, char *format, ... );
42void localinvite(nick *source, channel *cp, nick *target);
43
44void localsetmodeinit (modechanges *changes, channel *cp, nick *np);
45void localdosetmode_nick (modechanges *changes, nick *target, short modes);
46void localdosetmode_ban (modechanges *changes, const char *ban, short dir);
47void localdosetmode_key (modechanges *changes, const char *key, short dir);
48void localdosetmode_limit (modechanges *changes, unsigned int limit, short dir);
49void localdosetmode_simple (modechanges *changes, flag_t addmodes, flag_t delmodes);
50void localsetmodeflush (modechanges *changes, int force);
51
52#endif