]>
Commit | Line | Data |
---|---|---|
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 8b3f6f6bcfd6 ircd/gline.c | |
7 | --- a/ircd/gline.c Fri Jan 30 17:04:05 2009 +0100 | |
8 | +++ b/ircd/gline.c Fri Jan 30 18:11:37 2009 +0100 | |
9 | @@ -584,6 +584,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 | @@ -728,6 +740,17 @@ | |
29 | gline->gl_host ? gline->gl_host : "", | |
30 | gline->gl_expire + TSoffset, gline->gl_reason); | |
31 | ||
32 | + /* local gline removed by remote user, inform oper of success */ | |
33 | + if ((flags & GLINE_LOCAL) && IsUser(sptr) && !MyUser(sptr)) | |
34 | + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s %s %s for %s%s%s%s%s, expiring at %Tu: %s", | |
35 | + sptr, cli_name(sptr), | |
36 | + msg, GlineIsBadChan(gline) ? "BADCHAN" : "GLINE", | |
37 | + GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : gline->gl_nick, | |
38 | + GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : "!", | |
39 | + gline->gl_user, gline->gl_host ? "@" : "", | |
40 | + gline->gl_host ? gline->gl_host : "", | |
41 | + gline->gl_expire + TSoffset, gline->gl_reason); | |
42 | + | |
43 | if (!(flags & GLINE_LOCAL)) /* don't propagate local changes */ | |
44 | gline_propagate(cptr, sptr, gline); | |
45 | ||
46 | @@ -972,6 +995,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 | @@ -1020,6 +1053,16 @@ | |
64 | gline->gl_user, | |
65 | gline->gl_host ? "@" : "", gline->gl_host ? gline->gl_host : ""); | |
66 | ||
67 | + /* local change by remote user, inform oper of success */ | |
68 | + if (IsUser(sptr) && !MyUser(sptr)) | |
69 | + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s removing local %s for %s%s%s%s%s", | |
70 | + sptr, cli_name(sptr), | |
71 | + GlineIsBadChan(gline) ? "BADCHAN" : "GLINE", | |
72 | + GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : gline->gl_nick, | |
73 | + GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : "!", | |
74 | + gline->gl_user, gline->gl_host ? "@" : "", | |
75 | + gline->gl_host ? gline->gl_host : ""); | |
76 | + | |
77 | gline_free(gline); /* get rid of the G-line */ | |
78 | ||
79 | return 0; /* convenience return */ | |
80 | diff -r 8b3f6f6bcfd6 ircd/jupe.c | |
81 | --- a/ircd/jupe.c Fri Jan 30 17:04:05 2009 +0100 | |
82 | +++ b/ircd/jupe.c Fri Jan 30 18:11:37 2009 +0100 | |
83 | @@ -166,6 +166,20 @@ | |
84 | flags & JUPE_LOCAL ? "local " : "", server, expire + TSoffset, | |
85 | reason); | |
86 | ||
87 | + /* local jupe - let's see who else to inform */ | |
88 | + if (flags & JUPE_LOCAL) { | |
89 | + | |
90 | + /* set by remote oper - inform them about the success */ | |
91 | + if (IsUser(sptr) && !MyUser(sptr)) | |
92 | + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s adding local JUPE for %s, expiring at %Tu: %s", | |
93 | + sptr, cli_name(sptr), server, expire + TSoffset, reason); | |
94 | + | |
95 | + /* set by remote oper or a server/service - inform all opers */ | |
96 | + if (!MyUser(sptr)) | |
97 | + sendwallto_group_butone(&me, WALL_WALLOPS, 0, "%s adding local JUPE for %s, expiring at %Tu: %s", | |
98 | + cli_name(sptr), server, expire + TSoffset, reason); | |
99 | + } | |
100 | + | |
101 | /* make the jupe */ | |
102 | ajupe = make_jupe(server, reason, expire, lastmod, flags); | |
103 | ||
104 | @@ -275,6 +289,22 @@ | |
105 | JupeIsLocal(jupe) ? "removing local" : "deactivating", | |
106 | jupe->ju_server, jupe->ju_expire + TSoffset, jupe->ju_reason); | |
107 | ||
108 | + /* local jupe - let's see who else to inform */ | |
109 | + if (flags & JUPE_LOCAL) { | |
110 | + | |
111 | + /* done by remote oper - inform them about the success */ | |
112 | + if (IsUser(sptr) && !MyUser(sptr)) | |
113 | + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :% %s JUPE for %s, expiring at %Tu: %s", | |
114 | + sptr, cli_name(sptr), JupeIsLocal(jupe) ? "removing local" : "locally deactivating", | |
115 | + jupe->ju_server, jupe->ju_expire + TSoffset, jupe->ju_reason); | |
116 | + | |
117 | + /* done by remote oper or a server/service - inform all opers */ | |
118 | + if (!MyUser(sptr)) | |
119 | + sendwallto_group_butone(&me, WALL_WALLOPS, 0, "%s %s JUPE for %s, expiring at %Tu: %s", | |
120 | + cli_name(sptr), JupeIsLocal(jupe) ? "removing local" : "locally deactivating", | |
121 | + jupe->ju_server, jupe->ju_expire + TSoffset, jupe->ju_reason); | |
122 | + } | |
123 | + | |
124 | if (JupeIsLocal(jupe)) | |
125 | jupe_free(jupe); | |
126 | else if (!(flags & JUPE_LOCAL)) /* don't propagate local changes */ |