213 |
|
sendto_one(source_p, form_str(RPL_LUSERME), |
214 |
|
from, to, Count.local, Count.myserver); |
215 |
|
sendto_one(source_p, form_str(RPL_LOCALUSERS), |
216 |
< |
from, to, Count.local, Count.max_loc, |
217 |
< |
Count.local, Count.max_loc); |
216 |
> |
from, to, Count.local, Count.max_loc); |
217 |
|
} |
218 |
|
else |
219 |
|
{ |
220 |
|
sendto_one(source_p, form_str(RPL_LUSERME), |
221 |
|
from, to, Count.total, 0); |
222 |
|
sendto_one(source_p, form_str(RPL_LOCALUSERS), |
223 |
< |
from, to, Count.total, Count.max_tot, |
225 |
< |
Count.total, Count.max_tot); |
223 |
> |
from, to, Count.total, Count.max_tot); |
224 |
|
} |
225 |
|
|
226 |
|
sendto_one(source_p, form_str(RPL_GLOBALUSERS), |
227 |
< |
from, to, Count.total, Count.max_tot, |
230 |
< |
Count.total, Count.max_tot); |
227 |
> |
from, to, Count.total, Count.max_tot); |
228 |
|
|
229 |
|
if (!ConfigServerHide.hide_servers || HasUMode(source_p, UMODE_OPER)) |
230 |
|
sendto_one(source_p, form_str(RPL_STATSCONN), from, to, |
826 |
|
*/ |
827 |
|
void |
828 |
|
set_user_mode(struct Client *client_p, struct Client *source_p, |
829 |
< |
int parc, char *parv[]) |
829 |
> |
const int parc, char *parv[]) |
830 |
|
{ |
831 |
|
unsigned int flag, setflags; |
832 |
|
char **p, *m, buf[IRCD_BUFSIZE]; |
954 |
|
sendto_one(source_p, form_str(ERR_UMODEUNKNOWNFLAG), |
955 |
|
me.name, source_p->name); |
956 |
|
|
960 |
– |
if (HasUMode(source_p, UMODE_NCHANGE) && !HasOFlag(source_p, OPER_FLAG_N)) |
961 |
– |
{ |
962 |
– |
sendto_one(source_p, ":%s NOTICE %s :*** You have no nchange flag;", |
963 |
– |
me.name, source_p->name); |
964 |
– |
DelUMode(source_p, UMODE_NCHANGE); |
965 |
– |
} |
966 |
– |
|
957 |
|
if (MyConnect(source_p) && HasUMode(source_p, UMODE_ADMIN) && |
958 |
|
!HasOFlag(source_p, OPER_FLAG_ADMIN)) |
959 |
|
{ |
1071 |
|
send_umode(client_p, source_p, old, 0xffffffff, buf); |
1072 |
|
} |
1073 |
|
|
1074 |
+ |
void |
1075 |
+ |
user_set_hostmask(struct Client *target_p, const char *hostname) |
1076 |
+ |
{ |
1077 |
+ |
if (!valid_hostname(hostname)) |
1078 |
+ |
return; |
1079 |
+ |
|
1080 |
+ |
if (IsUserHostIp(target_p)) |
1081 |
+ |
delete_user_host(target_p->username, target_p->host, !MyConnect(target_p)); |
1082 |
+ |
|
1083 |
+ |
strlcpy(target_p->host, hostname, sizeof(target_p->host)); |
1084 |
+ |
SetIPSpoof(target_p); |
1085 |
+ |
|
1086 |
+ |
add_user_host(target_p->username, target_p->host, !MyConnect(target_p)); |
1087 |
+ |
SetUserHost(target_p); |
1088 |
+ |
|
1089 |
+ |
if (MyClient(target_p)) |
1090 |
+ |
clear_ban_cache_client(target_p); |
1091 |
+ |
} |
1092 |
+ |
|
1093 |
|
/* user_welcome() |
1094 |
|
* |
1095 |
|
* inputs - client pointer to client to welcome |
1113 |
|
#endif |
1114 |
|
|
1115 |
|
sendto_one(source_p, form_str(RPL_WELCOME), me.name, source_p->name, |
1116 |
< |
ServerInfo.network_name, source_p->name); |
1116 |
> |
ServerInfo.network_name, source_p->name, |
1117 |
> |
source_p->username, source_p->host); |
1118 |
|
sendto_one(source_p, form_str(RPL_YOURHOST), me.name, source_p->name, |
1119 |
|
get_listener_name(source_p->localClient->listener), ircd_version); |
1120 |
|
sendto_one(source_p, form_str(RPL_CREATED), |
1220 |
|
|
1221 |
|
if (HasOFlag(source_p, OPER_FLAG_ADMIN)) |
1222 |
|
AddUMode(source_p, UMODE_ADMIN); |
1213 |
– |
if (!HasOFlag(source_p, OPER_FLAG_N)) |
1214 |
– |
DelUMode(source_p, UMODE_NCHANGE); |
1223 |
|
|
1224 |
|
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, "%s is now an operator", |
1225 |
|
get_oper_name(source_p)); |
1252 |
|
void |
1253 |
|
init_uid(void) |
1254 |
|
{ |
1255 |
< |
int i; |
1255 |
> |
unsigned int i; |
1256 |
|
|
1257 |
|
memset(new_uid, 0, sizeof(new_uid)); |
1258 |
|
|