From 03d18a46b12cab6358d58033569ab2302ad9a543 Mon Sep 17 00:00:00 2001 From: Valery Yatsko Date: Tue, 8 Apr 2008 20:32:58 +0400 Subject: [PATCH] Fixed two places, where sendto_realops_flags was mistakenly used, and removed this function entirely --- include/send.h | 1 - modules/core/m_server.c | 2 +- src/listener.c | 2 +- src/send.c | 40 ---------------------------------------- 4 files changed, 2 insertions(+), 43 deletions(-) diff --git a/include/send.h b/include/send.h index c47bd23..cacdc7a 100644 --- a/include/send.h +++ b/include/send.h @@ -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); diff --git a/modules/core/m_server.c b/modules/core/m_server.c index 3a34c53..dfcf18e 100644 --- a/modules/core/m_server.c +++ b/modules/core/m_server.c @@ -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", diff --git a/src/listener.c b/src/listener.c index c95e34f..0cf3302 100644 --- a/src/listener.c +++ b/src/listener.c @@ -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(); diff --git a/src/send.c b/src/send.c index d2d603f..68d6ee6 100644 --- a/src/send.c +++ b/src/send.c @@ -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