1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
--- opercmds.c.orig Sun Mar 8 06:16:14 1998
+++ opercmds.c Sun Mar 8 06:16:08 1998
@@ -1465,9 +1465,16 @@
#endif /* GPATH */
/* Inform ops */
- sendto_op_mask(SNO_GLINE, "%s adding %sGLINE for %s@%s, expiring at %lu: %s",
- sptr->name, local ? "local " : "", user, host, expire, comment);
-
+ if (strlen (host) > 4)
+ {
+ sendto_op_mask(SNO_GLINE, "%s setting %sGLINE on %s@%s till %s:%s",
+ sptr->name, local ? "L" : "", user, host, myctime (expire), comment);
+ }
+ else
+ {
+ sendto_op_mask(SNO_GLINE, "%s ignoring %sGLINE on %s@%s (bad domain):%s",
+ sptr->name, local ? "L" : "", user, host, comment);
+ }
#ifdef GPATH
alarm(3); /* make a log entry */
logfile = open(GPATH, O_WRONLY | O_APPEND | O_CREAT, S_IRUSR | S_IWUSR);
@@ -1670,8 +1677,8 @@
{ /* new expire time? */
/* yes, notify the opers */
sendto_op_mask(SNO_GLINE,
- "%s resetting expiration time on GLINE for %s@%s to %lu",
- parv[0], agline->name, agline->host, expire);
+ "%s resetting expiration time on GLINE for %s@%s to %s",
+ parv[0], agline->name, agline->host, myctime (expire));
#ifdef GPATH
alarm(3); /* make a log entry */
@@ -1726,7 +1733,7 @@
priv = IsOper(cptr);
#endif
- if (priv)
+ if (priv && (strlen (host) > 4))
{ /* non-oper not permitted to change things */
if (*parv[1] == '-')
{ /* oper wants to deactivate the gline */
@@ -1772,7 +1779,7 @@
if (!agline)
{
#ifdef OPER_LGLINE
- if (priv && active && expire > now)
+ if (priv && active && expire > now && (strlen (host) > 4))
{
/* Add local G-line */
if (parc < 4 || !strchr(parv[3], ' '))
@@ -1781,7 +1788,16 @@
me.name, parv[0], "GLINE");
return 0;
}
- add_gline(sptr, ip_mask, host, parv[3], user, expire, 1);
+ add_gline(sptr, ip_mask, host, parv[3], user, expire, IsOper(cptr) ? 0 : 1);
+ if (IsOper(cptr))
+ {
+ sendto_serv_butone(cptr, active ? ":%s GLINE %s +%s@%s %s :%s" :
+ ":%s GLINE %s -%s@%s", me.name, "*",
+ user, host, parv[2], parv[3]); /* global! */
+ sendto_ops_butone (NULL, &me,
+ ":%s WALLOPS :GLINE %s ON %s@%s %ss AT %s",
+ me.name, parv[0], user, host, parv[2], me.name);
+ }
}
else
#endif
@@ -1849,9 +1865,9 @@
{ /* changing the activation */
sendto_op_mask(SNO_GLINE, !expire ? "%s %sactivating GLINE for %s@%s" :
"%s %sactivating GLINE for %s@%s and "
- "resetting expiration time to %lu",
+ "resetting expiration time to %s",
parv[0], active ? "re" : "de", agline->name,
- agline->host, agline->expire);
+ agline->host, myctime(agline->expire));
#ifdef GPATH
alarm(3); /* make a log entry */
logfile = open(GPATH, O_WRONLY | O_APPEND | O_CREAT, S_IRUSR | S_IWUSR);
|