]>
Commit | Line | Data |
---|---|---|
edb26b39 P |
1 | # HG changeset patch |
2 | # Parent 721d58543cc7c0b60780e9826265a3224aebc216 | |
3 | ||
4 | diff -r 721d58543cc7 include/channel.h | |
5 | --- a/include/channel.h Sun Jul 14 19:04:45 2013 +0100 | |
6 | +++ b/include/channel.h Sun Jul 14 19:05:53 2013 +0100 | |
7 | @@ -282,6 +282,7 @@ | |
8 | struct SLink* invites; /**< List of invites on this channel */ | |
9 | struct Ban* banlist; /**< List of bans on this channel */ | |
10 | struct Mode mode; /**< This channels mode */ | |
11 | + unsigned int marker; /**< Channel marker */ | |
12 | char topic[TOPICLEN + 1]; /**< Channels topic */ | |
13 | char topic_nick[NICKLEN + 1]; /**< Nick of the person who set | |
14 | * The topic | |
15 | @@ -459,4 +460,6 @@ | |
16 | extern int apply_ban(struct Ban **banlist, struct Ban *newban, int free); | |
17 | extern void free_ban(struct Ban *ban); | |
18 | ||
19 | +extern unsigned int get_channel_marker(void); | |
20 | + | |
21 | #endif /* INCLUDED_channel_h */ | |
22 | diff -r 721d58543cc7 ircd/channel.c | |
23 | --- a/ircd/channel.c Sun Jul 14 19:04:45 2013 +0100 | |
24 | +++ b/ircd/channel.c Sun Jul 14 19:05:53 2013 +0100 | |
25 | @@ -3744,3 +3744,21 @@ | |
26 | if (member && IsDelayedJoin(member)) | |
27 | RevealDelayedJoin(member); | |
28 | } | |
29 | + | |
30 | +unsigned int get_channel_marker(void) | |
31 | +{ | |
32 | + static unsigned int marker = 0; | |
33 | + | |
34 | + if (!++marker) | |
35 | + { | |
36 | + struct Channel *cptr; | |
37 | + for (cptr=GlobalChannelList;cptr;cptr=cptr->next) | |
38 | + { | |
39 | + cptr->marker = 0; | |
40 | + } | |
41 | + | |
42 | + marker++; | |
43 | + } | |
44 | + | |
45 | + return marker; | |
46 | +} |