Fixed two places, where sendto_realops_flags was mistakenly used, and removed this function entirely

This commit is contained in:
Valery Yatsko 2008-04-08 20:32:58 +04:00
parent 79c3c679ad
commit 03d18a46b1
4 changed files with 2 additions and 43 deletions

View File

@ -72,7 +72,6 @@ extern void sendto_monitor(struct monitor *monptr, const char *, ...) AFP(2, 3);
extern void sendto_anywhere(struct Client *, struct Client *, const char *,
const char *, ...) AFP(4, 5);
extern void sendto_realops_flags(int, int, const char *, ...) AFP(3, 4);
extern void sendto_realops_snomask(int, int, const char *, ...) AFP(3, 4);
extern void sendto_realops_snomask_from(int, int, struct Client *, const char *, ...) AFP(4, 5);

View File

@ -174,7 +174,7 @@ mr_server(struct Client *client_p, struct Client *source_p, int parc, const char
/* NOT REACHED */
break;
case -5:
sendto_realops_flags(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"Connection from servername %s requires SSL/TLS but is plaintext",
name);
ilog(L_SERVER, "Access denied, requires SSL/TLS but is plaintext from %s",

View File

@ -501,7 +501,7 @@ accept_precallback(rb_fde_t *F, struct sockaddr *addr, rb_socklen_t addrlen, voi
*/
if((last_oper_notice + 20) <= rb_current_time())
{
sendto_realops_flags(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"All connections in use. (%s)",
get_listener_name(listener));
last_oper_notice = rb_current_time();

View File

@ -958,46 +958,6 @@ sendto_anywhere(struct Client *target_p, struct Client *source_p,
rb_linebuf_donebuf(&linebuf);
}
/* sendto_realops_flags()
*
* inputs - umode needed, level (opers/admin), va_args
* output -
* side effects - message is sent to opers with matching umodes
*/
void
sendto_realops_flags(int flags, int level, const char *pattern, ...)
{
struct Client *client_p;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
va_list args;
buf_head_t linebuf;
rb_linebuf_newbuf(&linebuf);
va_start(args, pattern);
rb_linebuf_putmsg(&linebuf, pattern, &args,
":%s NOTICE * :*** Notice -- ", me.name);
va_end(args);
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, local_oper_list.head)
{
client_p = ptr->data;
/* If we're sending it to opers and theyre an admin, skip.
* If we're sending it to admins, and theyre not, skip.
*/
if(((level == L_ADMIN) && !IsOperAdmin(client_p)) ||
((level == L_OPER) && IsOperAdmin(client_p)))
continue;
if(client_p->umodes & flags)
_send_linebuf(client_p, &linebuf);
}
rb_linebuf_donebuf(&linebuf);
}
/* sendto_realops_snomask()
*
* inputs - snomask needed, level (opers/admin), va_args