]> jfr.im git - irc/quakenet/snircd-patchqueue.git/blame - autosethost.patch
showumodehtoclients: fix -h mode change not showing to client
[irc/quakenet/snircd-patchqueue.git] / autosethost.patch
CommitLineData
ad318bac 1when autoapplying spoof blocks notify user what their hidden host is (same as when the host is hidden normally)
3600cfbf 2
ad318bac 3send "Using Spoof block privilege" as NOTICE AUTH, preventing sending any other numeric reples before the 001 002 etc replies
4send RPL_HOSTHIDDEN after all connect stuff, same place this reply is sent in case IAUTH set the user +rx
5commented out numeric reply RPL_USINGSLINE, no longer used
6
32438812 7diff -r 350a7bb87be2 include/numeric.h
8--- a/include/numeric.h
9+++ b/include/numeric.h
0d0dae14 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
32438812 19diff -r 350a7bb87be2 ircd/s_conf.c
20--- a/ircd/s_conf.c
21+++ b/ircd/s_conf.c
93d44028 22@@ -1270,8 +1270,9 @@
3600cfbf 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);
3600cfbf 29+ SetSetHost(cptr);
30 return 1;
31 }
32 }
32438812 33diff -r 350a7bb87be2 ircd/s_err.c
34--- a/ircd/s_err.c
35+++ b/ircd/s_err.c
3600cfbf 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" },
93d44028 41+ { 0 },
3600cfbf 42 /* 400 */
43 { 0 },
44 /* 401 */
32438812 45diff -r 350a7bb87be2 ircd/s_user.c
46--- a/ircd/s_user.c
47+++ b/ircd/s_user.c
93d44028 48@@ -373,12 +373,11 @@
49
3600cfbf 50 if (feature_bool(FEAT_AUTOINVISIBLE))
51 SetInvisible(sptr);
93d44028 52-
53+
54+ /* apply auto sethost if needed */
55 if(feature_bool(FEAT_SETHOST_AUTO)) {
3600cfbf 56- if (conf_check_slines(sptr)) {
57- send_reply(sptr, RPL_USINGSLINE);
58- SetSetHost(sptr);
59- }
93d44028 60+ if (conf_check_slines(sptr))
61+ sendrawto_one(sptr, "NOTICE AUTH :*** Using Spoof block privilege");
62 }
3600cfbf 63
64 SetUser(sptr);
93d44028 65@@ -456,6 +455,9 @@
66 */
67 if (HasHiddenHost(sptr))
68 hide_hostmask(sptr, FLAG_HIDDENHOST);
ad318bac 69+ /* my user has sethost, inform them of their hidden host from auto applied sethost */
32438812 70+ if (IsSetHost(sptr) && MyConnect(sptr))
93d44028 71+ send_reply(sptr, RPL_HOSTHIDDEN, cli_user(sptr)->host);
72 if (IsInvisible(sptr))
73 ++UserStats.inv_clients;
74 if (IsOper(sptr))