From b1ace057a79ec5a2777a53470b22a5fc519231a0 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Fri, 5 Sep 2008 22:56:59 +0200 Subject: [PATCH] Avoid empty strings in various notices about rejected server connections. These come from the name field which is empty for unknown connections attempting to become a server. Instead, put [@255.255.255.255] just like ratbox3 does. --- modules/core/m_server.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/core/m_server.c b/modules/core/m_server.c index d2c40a93..40095001 100644 --- a/modules/core/m_server.c +++ b/modules/core/m_server.c @@ -119,7 +119,7 @@ mr_server(struct Client *client_p, struct Client *source_p, int parc, const char sendto_realops_snomask(SNO_GENERAL, L_ALL, "Unauthorised server connection attempt from %s: " "No entry for servername %s", - client_p->name, name); + "[@255.255.255.255]", name); ilog(L_SERVER, "Access denied, no connect block for server %s%s", EmptyString(client_p->name) ? name : "", @@ -135,7 +135,7 @@ mr_server(struct Client *client_p, struct Client *source_p, int parc, const char sendto_realops_snomask(SNO_GENERAL, is_remote_connect(client_p) ? L_NETWIDE : L_ALL, "Unauthorised server connection attempt from %s: " "Bad password for server %s", - client_p->name, name); + "[@255.255.255.255]", name); ilog(L_SERVER, "Access denied, invalid password for server %s%s", EmptyString(client_p->name) ? name : "", @@ -150,7 +150,7 @@ mr_server(struct Client *client_p, struct Client *source_p, int parc, const char sendto_realops_snomask(SNO_GENERAL, L_ALL, "Unauthorised server connection attempt from %s: " "Invalid host for server %s", - client_p->name, name); + "[@255.255.255.255]", name); ilog(L_SERVER, "Access denied, invalid host for server %s%s", EmptyString(client_p->name) ? name : "", @@ -165,7 +165,7 @@ mr_server(struct Client *client_p, struct Client *source_p, int parc, const char case -4: sendto_realops_snomask(SNO_GENERAL, L_ALL, "Invalid servername %s from %s", - name, client_p->name); + name, "[@255.255.255.255]"); ilog(L_SERVER, "Access denied, invalid servername from %s", log_client_name(client_p, SHOW_IP)); @@ -208,7 +208,7 @@ mr_server(struct Client *client_p, struct Client *source_p, int parc, const char */ sendto_realops_snomask(SNO_GENERAL, L_ALL, "Attempt to re-introduce server %s from %s", - name, client_p->name); + name, "[@255.255.255.255]"); ilog(L_SERVER, "Attempt to re-introduce server %s from %s", name, log_client_name(client_p, SHOW_IP));