]> jfr.im git - irc/quakenet/snircd-patchqueue.git/blob - opernotify.patch
Remove topic_reveal.patch. This has been fixed in IRCU and ircu patch is correct...
[irc/quakenet/snircd-patchqueue.git] / opernotify.patch
1 # HG changeset patch
2 # Parent 4851bf918b577c1e610417fe4ae4886ee78fd17b
3
4 diff -r 4851bf918b57 ircd/s_user.c
5 --- a/ircd/s_user.c Thu Jul 25 18:47:45 2013 +0100
6 +++ b/ircd/s_user.c Thu Jul 25 18:57:13 2013 +0100
7 @@ -1312,7 +1312,7 @@
8 if (MyConnect(sptr))
9 {
10 tmpmask = cli_snomask(sptr) & ~SNO_OPER;
11 - cli_handler(sptr) = CLIENT_HANDLER;
12 + cli_handler(sptr) = CLIENT_HANDLER;
13 }
14 }
15 break;
16 @@ -1501,27 +1501,44 @@
17 /* user now oper */
18 ++UserStats.opers;
19 client_set_privs(sptr, NULL); /* may set propagate privilege */
20 +
21 + /* notify my operators a user has OPERed on a remote server */
22 + if (!MyConnect(sptr)) {
23 + sendto_opmask_butone(0, SNO_OLDSNO, "%s (%s@%s) is now operator (O) as %s on %s",
24 + cli_name(sptr), cli_user(sptr)->realusername, cli_user(sptr)->realhost,
25 + cli_user(sptr)->opername ? cli_user(sptr)->opername : "<unknown>", cli_name(cli_user(sptr)->server));
26 + }
27 +
28 }
29 /* remember propagate privilege setting */
30 if (HasPriv(sptr, PRIV_PROPAGATE)) {
31 prop = 1;
32 }
33 +
34 + /* user was a local operator */
35 + if (FlagHas(&setflags, FLAG_LOCOP) && !IsLocOp(sptr)) {
36 +
37 + /* notify my operators a local operator has deOPERed */
38 + sendto_opmask_butone(0, SNO_OLDSNO, "%s (%s@%s) is no longer operator (o) as %s",
39 + cli_name(sptr), cli_user(sptr)->realusername, cli_sockhost(sptr),
40 + cli_user(sptr)->opername);
41 + }
42 if (FlagHas(&setflags, FLAG_OPER) && !IsOper(sptr)) {
43 /* user no longer oper */
44 assert(UserStats.opers > 0);
45 --UserStats.opers;
46
47 - /* notify my operators an operator has deOPERed on the network - wiebe */
48 + /* notify my operators an operator has deOPERed on the network */
49 if (MyConnect(sptr)) {
50 - sendto_opmask_butone(0, SNO_OLDSNO, "%s (%s@%s) is no longer operator (O) as %s",
51 - cli_name(sptr), cli_user(sptr)->realusername, cli_user(sptr)->realhost,
52 - cli_user(sptr)->opername ? cli_user(sptr)->opername : "<unknown>");
53 + sendto_opmask_butone(0, SNO_OLDSNO, "%s (%s@%s) is no longer operator (O)",
54 + cli_name(sptr), cli_user(sptr)->realusername, cli_sockhost(sptr),
55 + cli_user(sptr)->opername ? cli_user(sptr)->opername : "<unknown>");
56 } else {
57 - sendto_opmask_butone(0, SNO_OLDSNO, "%s (%s@%s) is no longer operator (O) as %s on %s",
58 - cli_name(sptr), cli_user(sptr)->realusername, cli_user(sptr)->realhost,
59 - cli_user(sptr)->opername ? cli_user(sptr)->opername : "<unknown>", cli_name(cli_user(sptr)->server));
60 + sendto_opmask_butone(0, SNO_OLDSNO, "%s (%s@%s) is no longer operator (O) on %s",
61 + cli_name(sptr), cli_user(sptr)->realusername, cli_user(sptr)->realhost,
62 + cli_user(sptr)->opername ? cli_user(sptr)->opername : "<unknown>", cli_name(cli_user(sptr)->server));
63 }
64 -
65 +
66 client_set_privs(sptr, NULL); /* will clear propagate privilege */
67 if (cli_user(sptr)->opername) {
68 MyFree(cli_user(sptr)->opername);