evilnet / nefarious2

Nefarious IRCu (Based on IRCu 2.10.12)
Other
39 stars 23 forks source link

/quote stats c / showing IPs #34

Closed WildClaudio closed 9 years ago

WildClaudio commented 9 years ago

Hello i just noticed that nefarious-master source is showing HUB ips when /quote stats c command is used and and the Release version 2.0 is not showing ... here are the differences btw the 2 sources -master SOURCE /stats C reply : [00:49:21] * C hub01.EU * 1.1.1.1 4400 65535 * Server [00:49:21] * C hub03.US * 2.2.2.2 4400 65535 * Server [00:49:21] * C hub01.US * 3.3.3.3 4400 65535 * Server -2.0 SOURCE /stats C reply: [00:51:28] * C hub03.US * 4400 65535 * Server [00:51:29] * C hub01.EU * 4400 65535 * Server [00:51:29] * C hub02.US * 4400 65535 * Server

IP replaced with "*" i think its not a good idea to show hubs-IPs to network opers due the "leak" revenge in some situation !! or maybe you can point me to the right lines and i`ll change/hide the stats c "reply" thank you in advance !!!

jobe1986 commented 9 years ago

Firstly to hide these IPs from IRCops is a lot more effort then simply just changing the STATS c output. There are numerous server notices that apply as well.

Secondly the line in question is (in ircd/s_stats.c): send_reply(sptr, RPL_STATSCLINE, name, host, port, maximum, hub_limit, get_conf_class(tmp));

However you wont be able to just remove "host" from that line, you will need to replace it with something like: send_reply(sptr, RPL_STATSCLINE, name, "*", port, maximum, hub_limit, get_conf_class(tmp));

WildClaudio commented 9 years ago

ok problem solved added "*" and i`v checked the old s_stats.c from 2.0 version the difference btw 2.0 and -master is that in 2.0 there is no "host" in that line thats why in 2.0 is not showing the ips tryed tried to compile -master with s_stats.c from 2.0 is givving ircd SIGSERV and closing the process ..

the only difference btw 2.0 and -master in s_stats.c is that using /stats c as server ADMIN will show me the hub list with the IPs thats great i am an admin i can check them online or checking ircd.conf but if other admin/global oper will use /stats c my.server.com will not be able to see the IPs only the hostnames of hubs thats great ...now -master s_stats.c modified with "" instead of string "host" will add a extra \ instead showing the IP thats what i wanted but the setting apply to all /stats c requests using /stats c or /stats c his.server.com so i think 2.0 s_stats.c was kinda writed/coded better then -master version ..my opinion :) but thank you worked here and now hubs ips are hidden !!!