261 |
|
ilog(LOG_TYPE_IRCD, "Too many connections on IP from %s.", |
262 |
|
get_client_name(source_p, SHOW_IP)); |
263 |
|
++ServerStats.is_ref; |
264 |
< |
exit_client(source_p, &me, "No more connections allowed on that IP"); |
264 |
> |
exit_client(source_p, "No more connections allowed on that IP"); |
265 |
|
break; |
266 |
|
|
267 |
|
case I_LINE_FULL: |
272 |
|
ilog(LOG_TYPE_IRCD, "Too many connections from %s.", |
273 |
|
get_client_name(source_p, SHOW_IP)); |
274 |
|
++ServerStats.is_ref; |
275 |
< |
exit_client(source_p, &me, |
276 |
< |
"No more connections allowed in your connection class"); |
275 |
> |
exit_client(source_p, "No more connections allowed in your connection class"); |
276 |
|
break; |
277 |
|
|
278 |
|
case NOT_AUTHORIZED: |
291 |
|
source_p->localClient->listener->name, |
292 |
|
source_p->localClient->listener->port); |
293 |
|
|
294 |
< |
exit_client(source_p, &me, "You are not authorized to use this server"); |
294 |
> |
exit_client(source_p, "You are not authorized to use this server"); |
295 |
|
break; |
296 |
|
|
297 |
|
case BANNED_CLIENT: |
298 |
< |
exit_client(source_p, &me, "Banned"); |
298 |
> |
exit_client(source_p, "Banned"); |
299 |
|
++ServerStats.is_ref; |
300 |
|
break; |
301 |
|
|
317 |
|
verify_access(struct Client *client_p) |
318 |
|
{ |
319 |
|
struct MaskItem *conf = NULL; |
320 |
< |
char non_ident[USERLEN + 1] = { '~', '\0' }; |
320 |
> |
char non_ident[USERLEN + 1] = "~"; |
321 |
|
|
322 |
|
if (IsGotId(client_p)) |
323 |
|
{ |
335 |
|
client_p->localClient->passwd); |
336 |
|
} |
337 |
|
|
338 |
< |
if (conf != NULL) |
338 |
> |
if (conf) |
339 |
|
{ |
340 |
|
if (IsConfClient(conf)) |
341 |
|
{ |
342 |
|
if (IsConfRedir(conf)) |
343 |
|
{ |
344 |
< |
sendto_one(client_p, form_str(RPL_REDIR), |
345 |
< |
me.name, client_p->name, |
346 |
< |
conf->name ? conf->name : "", |
348 |
< |
conf->port); |
344 |
> |
sendto_one_numeric(client_p, &me, RPL_REDIR, |
345 |
> |
conf->name ? conf->name : "", |
346 |
> |
conf->port); |
347 |
|
return NOT_AUTHORIZED; |
348 |
|
} |
349 |
|
|
366 |
|
else if (IsConfKill(conf) || (ConfigFileEntry.glines && IsConfGline(conf))) |
367 |
|
{ |
368 |
|
if (IsConfGline(conf)) |
369 |
< |
sendto_one(client_p, ":%s NOTICE %s :*** G-lined", me.name, |
370 |
< |
client_p->name); |
373 |
< |
sendto_one(client_p, ":%s NOTICE %s :*** Banned: %s", |
374 |
< |
me.name, client_p->name, conf->reason); |
369 |
> |
sendto_one_notice(client_p, &me, ":*** G-lined"); |
370 |
> |
sendto_one_notice(client_p, &me, ":*** Banned: %s", conf->reason); |
371 |
|
return BANNED_CLIENT; |
372 |
|
} |
373 |
|
} |
422 |
|
if (!IsConfExemptLimits(conf)) |
423 |
|
return TOO_MANY; /* Already at maximum allowed */ |
424 |
|
|
425 |
< |
sendto_one(client_p, |
426 |
< |
":%s NOTICE %s :*** Your connection class is full, " |
431 |
< |
"but you have exceed_limit = yes;", me.name, client_p->name); |
425 |
> |
sendto_one_notice(client_p, &me, ":*** Your connection class is full, " |
426 |
> |
"but you have exceed_limit = yes;"); |
427 |
|
} |
428 |
|
|
429 |
|
return attach_conf(client_p, conf); |
1812 |
|
} |
1813 |
|
|
1814 |
|
if (warn) |
1815 |
< |
sendto_one(source_p, ":%s NOTICE %s :Please include at least %d non-wildcard characters with the mask", |
1816 |
< |
me.name, source_p->name, ConfigFileEntry.min_nonwildcard); |
1815 |
> |
sendto_one_notice(source_p, &me, |
1816 |
> |
":Please include at least %d non-wildcard characters with the mask", |
1817 |
> |
ConfigFileEntry.min_nonwildcard); |
1818 |
|
va_end(args); |
1819 |
|
return 0; |
1820 |
|
} |
1874 |
|
*tkline_time = found_tkline_time; |
1875 |
|
else |
1876 |
|
{ |
1877 |
< |
sendto_one(source_p, ":%s NOTICE %s :temp_line not supported by %s", |
1882 |
< |
me.name, source_p->name, cmd); |
1877 |
> |
sendto_one_notice(source_p, &me, ":temp_line not supported by %s", cmd); |
1878 |
|
return -1; |
1879 |
|
} |
1880 |
|
} |
1881 |
|
|
1882 |
|
if (parc == 0) |
1883 |
|
{ |
1884 |
< |
sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), |
1890 |
< |
me.name, source_p->name, cmd); |
1884 |
> |
sendto_one_numeric(source_p, &me, ERR_NEEDMOREPARAMS, cmd); |
1885 |
|
return -1; |
1886 |
|
} |
1887 |
|
|
1908 |
|
|
1909 |
|
if (target_server == NULL) |
1910 |
|
{ |
1911 |
< |
sendto_one(source_p, ":%s NOTICE %s :ON server not supported by %s", |
1918 |
< |
me.name, source_p->name, cmd); |
1911 |
> |
sendto_one_notice(source_p, &me, ":ON server not supported by %s", cmd); |
1912 |
|
return -1; |
1913 |
|
} |
1914 |
|
|
1915 |
|
if (!HasOFlag(source_p, OPER_FLAG_REMOTEBAN)) |
1916 |
|
{ |
1917 |
< |
sendto_one(source_p, form_str(ERR_NOPRIVS), |
1925 |
< |
me.name, source_p->name, "remoteban"); |
1917 |
> |
sendto_one_numeric(source_p, &me, ERR_NOPRIVS, "remoteban"); |
1918 |
|
return -1; |
1919 |
|
} |
1920 |
|
|
1921 |
|
if (parc == 0 || EmptyString(*parv)) |
1922 |
|
{ |
1923 |
< |
sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), |
1932 |
< |
me.name, source_p->name, cmd); |
1923 |
> |
sendto_one_numeric(source_p, &me, ERR_NEEDMOREPARAMS, cmd); |
1924 |
|
return -1; |
1925 |
|
} |
1926 |
|
|
1942 |
|
{ |
1943 |
|
if (strchr(user, '!') != NULL) |
1944 |
|
{ |
1945 |
< |
sendto_one(source_p, ":%s NOTICE %s :Invalid character '!' in kline", |
1955 |
< |
me.name, source_p->name); |
1945 |
> |
sendto_one_notice(source_p, &me, ":Invalid character '!' in kline"); |
1946 |
|
return -1; |
1947 |
|
} |
1948 |
|
|
2021 |
|
/* Try to find user@host mask from nick */ |
2022 |
|
/* Okay to use source_p as the first param, because source_p == client_p */ |
2023 |
|
if ((target_p = |
2024 |
< |
find_chasing(source_p, user_host_or_nick, NULL)) == NULL) |
2024 |
> |
find_chasing(source_p, user_host_or_nick)) == NULL) |
2025 |
|
return 0; |
2026 |
|
|
2027 |
|
if (IsExemptKline(target_p)) |
2028 |
|
{ |
2029 |
|
if (!IsServer(source_p)) |
2030 |
< |
sendto_one(source_p, |
2041 |
< |
":%s NOTICE %s :%s is E-lined", |
2042 |
< |
me.name, source_p->name, target_p->name); |
2030 |
> |
sendto_one_notice(source_p, &me, ":%s is E-lined", target_p->name); |
2031 |
|
return 0; |
2032 |
|
} |
2033 |
|
|