]>
Commit | Line | Data |
---|---|---|
1 | # HG changeset patch | |
2 | # Parent c58e84d80db66615ad384337b948077c934f002c | |
3 | ||
4 | diff -r c58e84d80db6 include/channel.h | |
5 | --- a/include/channel.h Sat Jul 13 23:40:05 2013 +0100 | |
6 | +++ b/include/channel.h Sun Jul 14 00:16:14 2013 +0100 | |
7 | @@ -112,6 +112,8 @@ | |
8 | #define MODE_APASS 0x200000 | |
9 | #define MODE_WASDELJOINS 0x400000 /**< Not DELJOINS, but some joins | |
10 | * pending */ | |
11 | +#define MODE_NOQUITPARTS 0x800000 | |
12 | + | |
13 | /** mode flags which take another parameter (With PARAmeterS) | |
14 | */ | |
15 | #define MODE_WPARAS (MODE_CHANOP|MODE_VOICE|MODE_BAN|MODE_KEY|MODE_LIMIT|MODE_APASS|MODE_UPASS) | |
16 | diff -r c58e84d80db6 include/supported.h | |
17 | --- a/include/supported.h Sat Jul 13 23:40:05 2013 +0100 | |
18 | +++ b/include/supported.h Sun Jul 14 00:16:14 2013 +0100 | |
19 | @@ -65,7 +65,7 @@ | |
20 | #define FEATURESVALUES2 NICKLEN, TOPICLEN, AWAYLEN, TOPICLEN, \ | |
21 | feature_int(FEAT_CHANNELLEN), CHANNELLEN, \ | |
22 | (feature_bool(FEAT_LOCAL_CHANNELS) ? "#&" : "#"), "(ov)@+", "@+", \ | |
23 | - (feature_bool(FEAT_OPLEVELS) ? "b,AkU,l,imnpstrDdR" : "b,k,l,imnpstrDdR"), \ | |
24 | + (feature_bool(FEAT_OPLEVELS) ? "b,AkU,l,imnpstrDdRu" : "b,k,l,imnpstrDdRu"), \ | |
25 | "rfc1459", feature_str(FEAT_NETWORK) | |
26 | ||
27 | #endif /* INCLUDED_supported_h */ | |
28 | diff -r c58e84d80db6 ircd/channel.c | |
29 | --- a/ircd/channel.c Sat Jul 13 23:40:05 2013 +0100 | |
30 | +++ b/ircd/channel.c Sun Jul 14 00:16:14 2013 +0100 | |
31 | @@ -828,6 +828,8 @@ | |
32 | *mbuf++ = 'n'; | |
33 | if (chptr->mode.mode & MODE_REGONLY) | |
34 | *mbuf++ = 'r'; | |
35 | + if (chptr->mode.mode & MODE_NOQUITPARTS) | |
36 | + *mbuf++ = 'u'; | |
37 | if (chptr->mode.mode & MODE_DELJOINS) | |
38 | *mbuf++ = 'D'; | |
39 | else if (MyUser(cptr) && (chptr->mode.mode & MODE_WASDELJOINS)) | |
40 | @@ -844,7 +846,7 @@ | |
41 | *mbuf++ = 'k'; | |
42 | if (previous_parameter) | |
43 | strcat(pbuf, " "); | |
44 | - if (is_chan_op(cptr, chptr) || IsServer(cptr)) { | |
45 | + if (is_chan_op(cptr, chptr) || IsServer(cptr) || IsOper(cptr)) { | |
46 | strcat(pbuf, chptr->mode.key); | |
47 | } else | |
48 | strcat(pbuf, "*"); | |
49 | @@ -1534,6 +1536,7 @@ | |
50 | MODE_LIMIT, 'l', | |
51 | /* MODE_APASS, 'A', */ | |
52 | /* MODE_UPASS, 'U', */ | |
53 | + MODE_NOQUITPARTS, 'u', | |
54 | 0x0, 0x0 | |
55 | }; | |
56 | static int local_flags[] = { | |
57 | @@ -1959,7 +1962,7 @@ | |
58 | ||
59 | mode &= (MODE_ADD | MODE_DEL | MODE_PRIVATE | MODE_SECRET | MODE_MODERATED | | |
60 | MODE_TOPICLIMIT | MODE_INVITEONLY | MODE_NOPRIVMSGS | MODE_REGONLY | | |
61 | - MODE_DELJOINS | MODE_WASDELJOINS | MODE_REGISTERED); | |
62 | + MODE_DELJOINS | MODE_WASDELJOINS | MODE_REGISTERED | MODE_NOQUITPARTS); | |
63 | ||
64 | if (!(mode & ~(MODE_ADD | MODE_DEL))) /* don't add empty modes... */ | |
65 | return; | |
66 | @@ -2092,6 +2095,7 @@ | |
67 | MODE_LIMIT, 'l', | |
68 | MODE_REGONLY, 'r', | |
69 | MODE_DELJOINS, 'D', | |
70 | + MODE_NOQUITPARTS, 'u', | |
71 | 0x0, 0x0 | |
72 | }; | |
73 | unsigned int add; | |
74 | @@ -3232,6 +3236,7 @@ | |
75 | MODE_LIMIT, 'l', | |
76 | MODE_REGONLY, 'r', | |
77 | MODE_DELJOINS, 'D', | |
78 | + MODE_NOQUITPARTS, 'u', | |
79 | MODE_ADD, '+', | |
80 | MODE_DEL, '-', | |
81 | 0x0, 0x0 | |
82 | @@ -3498,11 +3503,13 @@ | |
83 | /* Send notification to channel */ | |
84 | if (!(flags & (CHFL_ZOMBIE | CHFL_DELAYED))) | |
85 | sendcmdto_channel_butserv_butone(jbuf->jb_source, CMD_PART, chan, NULL, 0, | |
86 | - (flags & CHFL_BANNED || !jbuf->jb_comment) ? | |
87 | - ":%H" : "%H :%s", chan, jbuf->jb_comment); | |
88 | + ((flags & CHFL_BANNED) || ((chan->mode.mode & MODE_NOQUITPARTS) | |
89 | + && !IsChannelService(member->user)) || !jbuf->jb_comment) ? | |
90 | + "%H" : "%H :%s", chan, jbuf->jb_comment); | |
91 | else if (MyUser(jbuf->jb_source)) | |
92 | sendcmdto_one(jbuf->jb_source, CMD_PART, jbuf->jb_source, | |
93 | - (flags & CHFL_BANNED || !jbuf->jb_comment) ? | |
94 | + ((flags & CHFL_BANNED) || (chan->mode.mode & MODE_NOQUITPARTS) | |
95 | + || !jbuf->jb_comment) ? | |
96 | ":%H" : "%H :%s", chan, jbuf->jb_comment); | |
97 | /* XXX: Shouldn't we send a PART here anyway? */ | |
98 | /* to users on the channel? Why? From their POV, the user isn't on | |
99 | diff -r c58e84d80db6 ircd/m_clearmode.c | |
100 | --- a/ircd/m_clearmode.c Sat Jul 13 23:40:05 2013 +0100 | |
101 | +++ b/ircd/m_clearmode.c Sun Jul 14 00:16:14 2013 +0100 | |
102 | @@ -124,6 +124,7 @@ | |
103 | MODE_LIMIT, 'l', | |
104 | MODE_REGONLY, 'r', | |
105 | MODE_DELJOINS, 'D', | |
106 | + MODE_NOQUITPARTS, 'u', | |
107 | 0x0, 0x0 | |
108 | }; | |
109 | int *flag_p; | |
110 | diff -r c58e84d80db6 ircd/m_quit.c | |
111 | --- a/ircd/m_quit.c Sat Jul 13 23:40:05 2013 +0100 | |
112 | +++ b/ircd/m_quit.c Sun Jul 14 00:16:14 2013 +0100 | |
113 | @@ -107,9 +107,11 @@ | |
114 | ||
115 | if (cli_user(sptr)) { | |
116 | struct Membership* chan; | |
117 | + /* (slug for +u) removed !IsDelayedJoin(chan) as splidge said to */ | |
118 | for (chan = cli_user(sptr)->channel; chan; chan = chan->next_channel) { | |
119 | - if (!IsZombie(chan) && !IsDelayedJoin(chan) && !member_can_send_to_channel(chan, 0)) | |
120 | - return exit_client(cptr, sptr, sptr, "Signed off"); | |
121 | + if (!IsZombie(chan) && (!member_can_send_to_channel(chan, 0) | |
122 | + || (chan->channel->mode.mode & MODE_NOQUITPARTS))) | |
123 | + return exit_client(cptr, sptr, sptr, "Signed off"); | |
124 | } | |
125 | } | |
126 | if (parc > 1 && !BadPtr(parv[parc - 1])) |