]>
Commit | Line | Data |
---|---|---|
7efbed3b | 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 | ||
a86155d4 | 6 | diff -r 9302219aa778 ircd/gline.c |
7 | --- a/ircd/gline.c Fri Jan 30 19:02:20 2009 +0100 | |
8 | +++ b/ircd/gline.c Fri Jan 30 19:12:16 2009 +0100 | |
7eec5d28 | 9 | @@ -584,6 +584,18 @@ |
88a737db | 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 | ||
a86155d4 | 28 | @@ -972,6 +984,16 @@ |
88a737db | 29 | gline->gl_host ? "@" : "", gline->gl_host ? gline->gl_host : "", |
30 | buf); | |
31 | ||
32 | + /* local change by remote user, inform oper of success */ | |
33 | + if ((action == GLINE_LOCAL_ACTIVATE || action == GLINE_LOCAL_DEACTIVATE) && IsUser(sptr) && !MyUser(sptr)) | |
34 | + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s modifying global %s for %s%s%s%s%s:%s", | |
35 | + sptr, cli_name(sptr), | |
36 | + 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 : "", buf); | |
41 | + | |
42 | /* We'll be simple for this release, but we can update this to change | |
43 | * the propagation syntax on future updates | |
44 | */ | |
a86155d4 | 45 | @@ -1020,6 +1042,16 @@ |
88a737db | 46 | gline->gl_user, |
47 | gline->gl_host ? "@" : "", gline->gl_host ? gline->gl_host : ""); | |
7eec5d28 | 48 | |
88a737db | 49 | + /* local change by remote user, inform oper of success */ |
50 | + if (IsUser(sptr) && !MyUser(sptr)) | |
51 | + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s removing local %s for %s%s%s%s%s", | |
52 | + sptr, cli_name(sptr), | |
53 | + GlineIsBadChan(gline) ? "BADCHAN" : "GLINE", | |
54 | + GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : gline->gl_nick, | |
55 | + GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : "!", | |
56 | + gline->gl_user, gline->gl_host ? "@" : "", | |
57 | + gline->gl_host ? gline->gl_host : ""); | |
7eec5d28 | 58 | + |
88a737db | 59 | gline_free(gline); /* get rid of the G-line */ |
60 | ||
7eec5d28 | 61 | return 0; /* convenience return */ |
a86155d4 | 62 | diff -r 9302219aa778 ircd/jupe.c |
63 | --- a/ircd/jupe.c Fri Jan 30 19:02:20 2009 +0100 | |
64 | +++ b/ircd/jupe.c Fri Jan 30 19:12:16 2009 +0100 | |
7eec5d28 | 65 | @@ -166,6 +166,20 @@ |
88a737db | 66 | flags & JUPE_LOCAL ? "local " : "", server, expire + TSoffset, |
67 | reason); | |
68 | ||
7eec5d28 | 69 | + /* local jupe - let's see who else to inform */ |
70 | + if (flags & JUPE_LOCAL) { | |
71 | + | |
72 | + /* set by remote oper - inform them about the success */ | |
73 | + if (IsUser(sptr) && !MyUser(sptr)) | |
74 | + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s adding local JUPE for %s, expiring at %Tu: %s", | |
75 | + sptr, cli_name(sptr), server, expire + TSoffset, reason); | |
76 | + | |
77 | + /* set by remote oper or a server/service - inform all opers */ | |
78 | + if (!MyUser(sptr)) | |
79 | + sendwallto_group_butone(&me, WALL_WALLOPS, 0, "%s adding local JUPE for %s, expiring at %Tu: %s", | |
80 | + cli_name(sptr), server, expire + TSoffset, reason); | |
81 | + } | |
88a737db | 82 | + |
83 | /* make the jupe */ | |
84 | ajupe = make_jupe(server, reason, expire, lastmod, flags); | |
85 | ||
7eec5d28 | 86 | @@ -275,6 +289,22 @@ |
88a737db | 87 | JupeIsLocal(jupe) ? "removing local" : "deactivating", |
88 | jupe->ju_server, jupe->ju_expire + TSoffset, jupe->ju_reason); | |
88a737db | 89 | |
7eec5d28 | 90 | + /* local jupe - let's see who else to inform */ |
91 | + if (flags & JUPE_LOCAL) { | |
92 | + | |
93 | + /* done by remote oper - inform them about the success */ | |
94 | + if (IsUser(sptr) && !MyUser(sptr)) | |
95 | + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :% %s JUPE for %s, expiring at %Tu: %s", | |
96 | + sptr, cli_name(sptr), JupeIsLocal(jupe) ? "removing local" : "locally deactivating", | |
97 | + jupe->ju_server, jupe->ju_expire + TSoffset, jupe->ju_reason); | |
98 | + | |
99 | + /* done by remote oper or a server/service - inform all opers */ | |
100 | + if (!MyUser(sptr)) | |
101 | + sendwallto_group_butone(&me, WALL_WALLOPS, 0, "%s %s JUPE for %s, expiring at %Tu: %s", | |
102 | + cli_name(sptr), JupeIsLocal(jupe) ? "removing local" : "locally deactivating", | |
103 | + jupe->ju_server, jupe->ju_expire + TSoffset, jupe->ju_reason); | |
104 | + } | |
105 | + | |
88a737db | 106 | if (JupeIsLocal(jupe)) |
107 | jupe_free(jupe); | |
7eec5d28 | 108 | else if (!(flags & JUPE_LOCAL)) /* don't propagate local changes */ |