]>
Commit | Line | Data |
---|---|---|
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 | ||
16 | typedef 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 */ | |
c85feb15 | 32 | int localburstontochannel(channel *cp, nick *np, time_t timestamp, flag_t modes, unsigned int limit, char *key); |
c86edd1d | 33 | int localjoinchannel(nick *np, channel *cp); |
334b567e | 34 | int localpartchannel(nick *np, channel *cp, char *reason); |
c86edd1d Q |
35 | int localcreatechannel(nick *np, char *channame); |
36 | int localgetops(nick *np, channel *cp); | |
37 | int localgetvoice(nick *np, channel *cp); | |
38 | int localsetmodes(nick *np, channel *cp, nick *target, short modes); | |
39 | void localsettopic(nick *np, channel *cp, char *topic); | |
40 | void localkickuser(nick *np, channel *cp, nick *target, const char *message); | |
41 | void localusermodechange(nick *np, channel *cp, char *modes); | |
bb4b25ee CP |
42 | void sendmessagetochannel(nick *source, channel *cp, char *format, ... ) __attribute__ ((format (printf, 3, 4))); |
43 | void sendopnoticetochannel(nick *source, channel *cp, char *format, ... ) __attribute__ ((format (printf, 3, 4))); | |
620cc49d | 44 | void localinvite(nick *source, chanindex *cip, nick *target); |
c86edd1d Q |
45 | |
46 | void localsetmodeinit (modechanges *changes, channel *cp, nick *np); | |
47 | void localdosetmode_nick (modechanges *changes, nick *target, short modes); | |
48 | void localdosetmode_ban (modechanges *changes, const char *ban, short dir); | |
934fe9ac | 49 | void localdosetmode_key (modechanges *changes, char *key, short dir); |
c86edd1d Q |
50 | void localdosetmode_limit (modechanges *changes, unsigned int limit, short dir); |
51 | void localdosetmode_simple (modechanges *changes, flag_t addmodes, flag_t delmodes); | |
52 | void localsetmodeflush (modechanges *changes, int force); | |
53 | ||
54 | #endif |