]> jfr.im git - irc/quakenet/snircd-patchqueue.git/blob - autosethost.patch
autosethost: correct S-line privilige message and send RPL_HOSTHIDDEN informing clien...
[irc/quakenet/snircd-patchqueue.git] / autosethost.patch
1 when autoapplying spoof blocks notify user what their hidden host is (same as /sethost or +rx)
2 update numeric reply to reflect new conf format, blocks instead of lines
3
4 diff -r 6eb88b2e3b90 ircd/s_conf.c
5 --- a/ircd/s_conf.c Wed Mar 17 17:18:13 2010 +0100
6 +++ b/ircd/s_conf.c Wed Mar 17 17:40:43 2010 +0100
7 @@ -1270,8 +1270,11 @@
8 continue;
9
10 ircd_strncpy(cli_user(cptr)->host, hostonly, HOSTLEN);
11 - log_write(LS_USER, L_INFO, LOG_NOSNOTICE, "S-Line (%s@%s) by (%#R)",
12 + log_write(LS_USER, L_INFO, LOG_NOSNOTICE, "Spoofhost (%s@%s) by (%#R)",
13 cli_user(cptr)->username, hostonly, cptr);
14 + send_reply(cptr, RPL_USINGSLINE);
15 + send_reply(cptr, RPL_HOSTHIDDEN, cli_user(cptr)->host);
16 + SetSetHost(cptr);
17 return 1;
18 }
19 }
20 diff -r 6eb88b2e3b90 ircd/s_err.c
21 --- a/ircd/s_err.c Wed Mar 17 17:18:13 2010 +0100
22 +++ b/ircd/s_err.c Wed Mar 17 17:40:43 2010 +0100
23 @@ -830,7 +830,7 @@
24 /* 398 */
25 { RPL_STATSSLINE, "%d %s %s %s %s", "398" },
26 /* 399 */
27 - { RPL_USINGSLINE, ":Using S-line privilege", "399" },
28 + { RPL_USINGSLINE, ":Using Spoof block privilege", "399" },
29 /* 400 */
30 { 0 },
31 /* 401 */
32 diff -r 6eb88b2e3b90 ircd/s_user.c
33 --- a/ircd/s_user.c Wed Mar 17 17:18:13 2010 +0100
34 +++ b/ircd/s_user.c Wed Mar 17 17:40:43 2010 +0100
35 @@ -374,12 +374,8 @@
36 if (feature_bool(FEAT_AUTOINVISIBLE))
37 SetInvisible(sptr);
38
39 - if(feature_bool(FEAT_SETHOST_AUTO)) {
40 - if (conf_check_slines(sptr)) {
41 - send_reply(sptr, RPL_USINGSLINE);
42 - SetSetHost(sptr);
43 - }
44 - }
45 + if(feature_bool(FEAT_SETHOST_AUTO))
46 + conf_check_slines(sptr);
47
48 SetUser(sptr);
49 cli_handler(sptr) = CLIENT_HANDLER;