#include "msg.h"
#include "numnicks.h"
#include "numeric.h"
-#include "sys.h" /* FALSE bleah */
#include "whocmds.h"
-#include <assert.h>
+/* #include <assert.h> -- Now using assert in ircd_log.h */
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
-#include <arpa/inet.h> /* for inet_ntoa */
#define CHECK_APPROVED 0 /**< Mask is acceptable */
#define CHECK_OVERRIDABLE 1 /**< Mask is acceptable, but not by default */
/* let the ops know about it */
sendto_opmask_butone(0, SNO_GLINE, "G-line active for %s",
- get_client_name(acptr, TRUE));
+ get_client_name(acptr, SHOW_IP));
/* and get rid of him */
if ((tval = exit_client_msg(cptr, acptr, &me, "G-lined (%s)",
return 0;
DupString(t_uh, userhost);
- canon_userhost(t_uh, &user, &host, 0);
-
- if (BadPtr(user))
- return 0;
+ canon_userhost(t_uh, &user, &host, "*");
for (gline = GlobalGlineList; gline; gline = sgline) {
sgline = gline->gl_next;
else if (flags & GLINE_EXACT) {
if (((gline->gl_host && host && ircd_strcmp(gline->gl_host, host) == 0)
|| (!gline->gl_host && !host)) &&
- ((!user && ircd_strcmp(gline->gl_user, "*") == 0) ||
- ircd_strcmp(gline->gl_user, user) == 0))
+ (ircd_strcmp(gline->gl_user, user) == 0))
break;
} else {
- if (((gline->gl_host && host && ircd_strcmp(gline->gl_host, host) == 0)
+ if (((gline->gl_host && host && match(gline->gl_host, host) == 0)
|| (!gline->gl_host && !host)) &&
- ((!user && ircd_strcmp(gline->gl_user, "*") == 0) ||
- match(gline->gl_user, user) == 0))
+ (match(gline->gl_user, user) == 0))
break;
}
}