]> jfr.im git - irc/quakenet/snircd-patchqueue.git/blob - remoteglinejupe.patch
2c7faab7160276835332b5e44b99c0d53b36fedc
[irc/quakenet/snircd-patchqueue.git] / remoteglinejupe.patch
1 diff -r 31a4a0514c74 ircd/gline.c
2 --- a/ircd/gline.c Mon Jan 12 18:14:17 2009 +0100
3 +++ b/ircd/gline.c Mon Jan 12 18:18:57 2009 +0100
4 @@ -589,6 +589,18 @@
5 flags & (GLINE_BADCHAN|GLINE_REALNAME) ? "" : host,
6 expire + TSoffset, reason);
7
8 + /* local gline set by remote user, inform oper of success */
9 + if ((flags & GLINE_LOCAL) && IsUser(sptr) && !MyUser(sptr))
10 + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s adding local %s for %s%s%s%s%s, expiring at %Tu: %s",
11 + sptr, cli_name(sptr),
12 + (flags & GLINE_BADCHAN) ? "BADCHAN" : "GLINE",
13 + (flags & (GLINE_BADCHAN|GLINE_REALNAME)) ? "" : nick,
14 + (flags & (GLINE_BADCHAN|GLINE_REALNAME)) ? "" : "!",
15 + user,
16 + (flags & (GLINE_BADCHAN|GLINE_REALNAME)) ? "" : "@",
17 + (flags & (GLINE_BADCHAN|GLINE_REALNAME)) ? "" : host,
18 + expire + TSoffset, reason);
19 +
20 /* make the gline */
21 agline = make_gline(nick, user, host, reason, expire, lastmod, lifetime, flags);
22
23 @@ -731,6 +743,17 @@
24 gline->gl_host ? "@" : "",
25 gline->gl_host ? gline->gl_host : "",
26 gline->gl_expire + TSoffset, gline->gl_reason);
27 +
28 + /* local gline removed by remote user, inform oper of success */
29 + if ((flags & GLINE_LOCAL) && IsUser(sptr) && !MyUser(sptr))
30 + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s %s %s for %s%s%s%s%s, expiring at %Tu: %s",
31 + sptr, cli_name(sptr),
32 + msg, GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
33 + GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : gline->gl_nick,
34 + GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : "!",
35 + gline->gl_user, gline->gl_host ? "@" : "",
36 + gline->gl_host ? gline->gl_host : "",
37 + gline->gl_expire + TSoffset, gline->gl_reason);
38
39 if (!(flags & GLINE_LOCAL)) /* don't propagate local changes */
40 gline_propagate(cptr, sptr, gline);
41 @@ -931,6 +954,16 @@
42 gline->gl_host ? "@" : "", gline->gl_host ? gline->gl_host : "",
43 buf);
44
45 + /* local change by remote user, inform oper of success */
46 + if ((action == GLINE_LOCAL_ACTIVATE || action == GLINE_LOCAL_DEACTIVATE) && IsUser(sptr) && !MyUser(sptr))
47 + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s modifying global %s for %s%s%s%s%s:%s",
48 + sptr, cli_name(sptr),
49 + GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
50 + GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : gline->gl_nick,
51 + GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : "!",
52 + gline->gl_user, gline->gl_host ? "@" : "",
53 + gline->gl_host ? gline->gl_host : "", buf);
54 +
55 /* We'll be simple for this release, but we can update this to change
56 * the propagation syntax on future updates
57 */
58 @@ -977,6 +1010,16 @@
59 GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : "!",
60 gline->gl_user,
61 gline->gl_host ? "@" : "", gline->gl_host ? gline->gl_host : "");
62 +
63 + /* local change by remote user, inform oper of success */
64 + if (IsUser(sptr) && !MyUser(sptr))
65 + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s removing local %s for %s%s%s%s%s",
66 + sptr, cli_name(sptr),
67 + GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
68 + GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : gline->gl_nick,
69 + GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : "!",
70 + gline->gl_user, gline->gl_host ? "@" : "",
71 + gline->gl_host ? gline->gl_host : "");
72
73 gline_free(gline); /* get rid of the G-line */
74
75 diff -r 31a4a0514c74 ircd/jupe.c
76 --- a/ircd/jupe.c Mon Jan 12 18:14:17 2009 +0100
77 +++ b/ircd/jupe.c Mon Jan 12 18:18:57 2009 +0100
78 @@ -166,6 +166,11 @@
79 flags & JUPE_LOCAL ? "local " : "", server, expire + TSoffset,
80 reason);
81
82 + /* local jupe set by remote user, inform oper of success */
83 + if ((flags & JUPE_LOCAL) && IsUser(sptr) && !MyUser(sptr))
84 + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s adding local JUPE for %s, expiring at %Tu: %s",
85 + sptr, cli_name(sptr), server, expire + TSoffset, reason);
86 +
87 /* make the jupe */
88 ajupe = make_jupe(server, reason, expire, lastmod, flags);
89
90 @@ -274,6 +279,11 @@
91 "%#C %s JUPE for %s, expiring at %Tu: %s", sptr,
92 JupeIsLocal(jupe) ? "removing local" : "deactivating",
93 jupe->ju_server, jupe->ju_expire + TSoffset, jupe->ju_reason);
94 +
95 + /* local jupe removed by remote user, inform oper of success */
96 + if ((flags & JUPE_LOCAL) && IsUser(sptr) && !MyUser(sptr))
97 + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s removing local JUPE for %s, expiring at %Tu: %s",
98 + sptr, cli_name(sptr), jupe->ju_server, jupe->ju_expire + TSoffset, jupe->ju_reason);
99
100 if (JupeIsLocal(jupe))
101 jupe_free(jupe);