]> jfr.im git - irc/quakenet/snircd-patchqueue.git/blame - opernotify.patch
Remove topic_reveal.patch. This has been fixed in IRCU and ircu patch is correct...
[irc/quakenet/snircd-patchqueue.git] / opernotify.patch
CommitLineData
edb26b39 1# HG changeset patch
88f64cf1 2# Parent 4851bf918b577c1e610417fe4ae4886ee78fd17b
edb26b39 3
88f64cf1
P
4diff -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))
edb26b39
P
9 {
10 tmpmask = cli_snomask(sptr) & ~SNO_OPER;
88f64cf1
P
11- cli_handler(sptr) = CLIENT_HANDLER;
12+ cli_handler(sptr) = CLIENT_HANDLER;
edb26b39
P
13 }
14 }
15 break;
88f64cf1 16@@ -1501,27 +1501,44 @@
edb26b39
P
17 /* user now oper */
18 ++UserStats.opers;
19 client_set_privs(sptr, NULL); /* may set propagate privilege */
20+
88f64cf1 21+ /* notify my operators a user has OPERed on a remote server */
edb26b39
P
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)) {
88f64cf1
P
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 */
edb26b39
P
44 assert(UserStats.opers > 0);
45 --UserStats.opers;
46
47- /* notify my operators an operator has deOPERed on the network - wiebe */
88f64cf1
P
48+ /* notify my operators an operator has deOPERed on the network */
49 if (MyConnect(sptr)) {
edb26b39
P
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>");
88f64cf1
P
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 {
edb26b39
P
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));
88f64cf1
P
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 }
edb26b39 64-
88f64cf1 65+
edb26b39
P
66 client_set_privs(sptr, NULL); /* will clear propagate privilege */
67 if (cli_user(sptr)->opername) {
68 MyFree(cli_user(sptr)->opername);