]> jfr.im git - irc/quakenet/snircd-patchqueue.git/blob - autosethost.patch
welcome: moved unsetting to welcome_unset and setting/changing to welcome_set
[irc/quakenet/snircd-patchqueue.git] / autosethost.patch
1 when autoapplying spoof blocks notify user what their hidden host is (same as when the host is hidden normally)
2
3 send "Using Spoof block privilege" as NOTICE AUTH, preventing sending any other numeric reples before the 001 002 etc replies
4 send RPL_HOSTHIDDEN after all connect stuff, same place this reply is sent in case IAUTH set the user +rx
5 commented out numeric reply RPL_USINGSLINE, no longer used
6
7 diff -r 350a7bb87be2 include/numeric.h
8 --- a/include/numeric.h
9 +++ b/include/numeric.h
10 @@ -314,7 +314,7 @@
11 /* RPL_NOUSERS 395 Dalnet/EFnet/IRCnet */
12 #define RPL_HOSTHIDDEN 396 /* UMODE +x completed succesfuly */
13 #define RPL_STATSSLINE 398 /* QuakeNet extension -froo */
14 -#define RPL_USINGSLINE 399 /* QuakeNet extension -froo */
15 +/* RPL_USINGSLINE 399 QuakeNet extension -froo */
16
17 /*
18 * Errors are in the range from 400-599 currently and are grouped by what
19 diff -r 350a7bb87be2 ircd/s_conf.c
20 --- a/ircd/s_conf.c
21 +++ b/ircd/s_conf.c
22 @@ -1270,8 +1270,9 @@
23 continue;
24
25 ircd_strncpy(cli_user(cptr)->host, hostonly, HOSTLEN);
26 - log_write(LS_USER, L_INFO, LOG_NOSNOTICE, "S-Line (%s@%s) by (%#R)",
27 + log_write(LS_USER, L_INFO, LOG_NOSNOTICE, "Spoofhost (%s@%s) by (%#R)",
28 cli_user(cptr)->username, hostonly, cptr);
29 + SetSetHost(cptr);
30 return 1;
31 }
32 }
33 diff -r 350a7bb87be2 ircd/s_err.c
34 --- a/ircd/s_err.c
35 +++ b/ircd/s_err.c
36 @@ -830,7 +830,7 @@
37 /* 398 */
38 { RPL_STATSSLINE, "%d %s %s %s %s", "398" },
39 /* 399 */
40 - { RPL_USINGSLINE, ":Using S-line privilege", "399" },
41 + { 0 },
42 /* 400 */
43 { 0 },
44 /* 401 */
45 diff -r 350a7bb87be2 ircd/s_user.c
46 --- a/ircd/s_user.c
47 +++ b/ircd/s_user.c
48 @@ -373,12 +373,11 @@
49
50 if (feature_bool(FEAT_AUTOINVISIBLE))
51 SetInvisible(sptr);
52 -
53 +
54 + /* apply auto sethost if needed */
55 if(feature_bool(FEAT_SETHOST_AUTO)) {
56 - if (conf_check_slines(sptr)) {
57 - send_reply(sptr, RPL_USINGSLINE);
58 - SetSetHost(sptr);
59 - }
60 + if (conf_check_slines(sptr))
61 + sendrawto_one(sptr, "NOTICE AUTH :*** Using Spoof block privilege");
62 }
63
64 SetUser(sptr);
65 @@ -456,6 +455,9 @@
66 */
67 if (HasHiddenHost(sptr))
68 hide_hostmask(sptr, FLAG_HIDDENHOST);
69 + /* my user has sethost, inform them of their hidden host from auto applied sethost */
70 + if (IsSetHost(sptr) && MyConnect(sptr))
71 + send_reply(sptr, RPL_HOSTHIDDEN, cli_user(sptr)->host);
72 if (IsInvisible(sptr))
73 ++UserStats.inv_clients;
74 if (IsOper(sptr))