]> jfr.im git - irc/quakenet/snircd-patchqueue.git/blame - rpingall.patch
whonoidle: hide idle time of users with mode +I in non-HIS setup in WHO
[irc/quakenet/snircd-patchqueue.git] / rpingall.patch
CommitLineData
8540a628 1RPING with target * travels to all servers, allowing an oper to easily get ping replies from all linked servers.
2
3diff -r 58882b64802f ircd/m_rping.c
4--- a/ircd/m_rping.c Sat Mar 27 15:09:21 2010 +0100
5+++ b/ircd/m_rping.c Sat Mar 27 16:21:11 2010 +0100
6@@ -152,6 +152,13 @@
7 sendcmdto_one(sptr, CMD_RPING, destination, "%C %s %s %s :%s",
8 destination, parv[2], parv[3], parv[4], parv[5]);
9 }
10+ /* target is *, send RPONG back and pass on to other servers */
11+ else if (parv[1][0] == '*' && parv[1][1] == '\0') {
12+ sendcmdto_one(&me, CMD_RPONG, sptr, "%s %s %s %s :%s", cli_name(sptr),
13+ parv[2], parv[3], parv[4], parv[5]);
14+ sendcmdto_serv_butone(sptr, CMD_RPING, cptr, "%s %s %s %s :%s",
15+ parv[1], parv[2], parv[3], parv[4], parv[5]);
16+ }
17 }
18 else {
19 if (parc < 3) {
20@@ -167,7 +174,11 @@
21 /*
22 * otherwise ping the destination from here
23 */
24- if ((destination = find_match_server(parv[1]))) {
25+ /* target is *, send to all servers */
26+ if (parv[1][0] == '*' && parv[1][1] == '\0')
27+ sendcmdto_serv_butone(&me, CMD_RPING, &me, "%s %C %s :%s", parv[1],
28+ sptr, militime(0, 0), parv[3]);
29+ else if ((destination = find_match_server(parv[1]))) {
30 assert(IsServer(destination) || IsMe(destination));
31 sendcmdto_one(&me, CMD_RPING, destination, "%C %C %s :%s", destination,
32 sptr, militime(0, 0), parv[3]);
33@@ -228,7 +239,11 @@
34 start_time = parv[2];
35 }
36
37- if ((acptr = find_match_server(parv[1]))) {
38+ /* target is *, send to all servers */
39+ if (parv[1][0] == '*' && parv[1][1] == '\0')
40+ sendcmdto_serv_butone(&me, CMD_RPING, cptr, "%s %C %s :%s", parv[1], sptr,
41+ militime(0, 0), start_time);
42+ else if ((acptr = find_match_server(parv[1]))) {
43 assert(IsServer(acptr) || IsMe(acptr));
44 sendcmdto_one(&me, CMD_RPING, acptr, "%C %C %s :%s", acptr, sptr,
45 militime(0, 0), start_time);