X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/d3455e2c7e2f9040e1b7628d9cf52b26a24dcefc..8a889b0a5ffbac79bea29658c7c0f4a89f9b7be8:/modules/m_testmask.c diff --git a/modules/m_testmask.c b/modules/m_testmask.c index c586e3f..5a19773 100644 --- a/modules/m_testmask.c +++ b/modules/m_testmask.c @@ -1,6 +1,6 @@ /* * m_testmask.c: Shows the number of matching local and global clients - * for a user@host mask, helpful when setting GLINE's + * for a user@host mask * * Copyright (C) 2003 by W. Campbell * Coypright (C) 2004 ircd-ratbox development team @@ -29,7 +29,6 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $Id: m_testmask.c 3161 2007-01-25 07:23:01Z nenolod $ * */ @@ -38,7 +37,7 @@ #include "client.h" #include "common.h" /* FALSE bleah */ #include "ircd.h" -#include "irc_string.h" +#include "match.h" #include "numeric.h" #include "s_conf.h" #include "logger.h" @@ -71,7 +70,7 @@ mo_testmask(struct Client *client_p, struct Client *source_p, int gcount = 0; char *name, *username, *hostname; const char *sockhost; - char *gecos = NULL, *mangle_gecos = NULL; + char *gecos = NULL; rb_dlink_node *ptr; name = LOCAL_COPY(parv[1]); @@ -105,38 +104,6 @@ mo_testmask(struct Client *client_p, struct Client *source_p, { gecos = LOCAL_COPY(parv[2]); collapse_esc(gecos); - if(strstr(gecos, "\\s")) - { - char *tmp = LOCAL_COPY(gecos); - char *orig = tmp; - char *new = tmp; - while(*orig) - { - if(*orig == '\\' && *(orig + 1) != '\0') - { - if(*(orig + 1) == 's') - { - *new++ = ' '; - orig += 2; - } - /* otherwise skip that and the escaped - * character after it, so we dont mistake - * \\s as \s --fl - */ - else - { - *new++ = *orig++; - *new++ = *orig++; - } - } - else - *new++ = *orig++; - } - - *new = '\0'; - mangle_gecos = LOCAL_COPY(tmp); - } else - mangle_gecos = gecos; } RB_DLINK_FOREACH(ptr, global_client_list.head) @@ -161,7 +128,7 @@ mo_testmask(struct Client *client_p, struct Client *source_p, if(name && !match(name, target_p->name)) continue; - if(mangle_gecos && !match_esc(mangle_gecos, target_p->info)) + if(gecos && !match_esc(gecos, target_p->info)) continue; if(MyClient(target_p))