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