|
From: <dia...@us...> - 2003-10-26 16:57:13
|
Update of /cvsroot/genericircd/gircd2.0/ircd
In directory sc8-pr-cvs1:/tmp/cvs-serv30501/ircd
Modified Files:
gline.c ircd_features.c m_nick.c m_whois.c s_err.c s_user.c
whocmds.c
Log Message:
Added WHOIS SERVICES and hopefully fixed the G-Line bug.
Index: gline.c
===================================================================
RCS file: /cvsroot/genericircd/gircd2.0/ircd/gline.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** gline.c 11 Oct 2003 13:59:19 -0000 1.2
--- gline.c 26 Oct 2003 16:56:26 -0000 1.3
***************
*** 70,107 ****
struct Gline* BadChanGlineList = 0;
- /*
- * - ASUKA ---------------------------------------------------------------------
- * Implement nick glines. sickening :)
- *
- * froo (fr...@qu...) - 2002/08/21
- * -----------------------------------------------------------------------------
- */
-
static void
! canon_userhost(char *userhost, char **nick_p, char **user_p, char **host_p, char *def_user)
{
! char *tmp, *s;
!
! if ((tmp = strchr(userhost, '!'))) {
! *nick_p = userhost;
! *(tmp++) = '\0';
! } else {
! *nick_p = def_user;
! tmp = userhost;
! }
! if (!(s = strchr(tmp, '@'))) {
*user_p = def_user;
! *host_p = tmp;
} else {
! *user_p = tmp;
! *(s++) = '\0';
! *host_p = s;
}
}
static struct Gline *
! make_gline(char *nick, char *user, char *host, char *reason, time_t expire,
! time_t lastmod, unsigned int flags)
{
struct Gline *gline, *sgline, *after = 0;
--- 70,91 ----
struct Gline* BadChanGlineList = 0;
static void
! canon_userhost(char *userhost, char **user_p, char **host_p, char *def_user)
{
! char *tmp;
! if (!(tmp = strchr(userhost, '@'))) {
*user_p = def_user;
! *host_p = userhost;
} else {
! *user_p = userhost;
! *(tmp++) = '\0';
! *host_p = tmp;
}
}
static struct Gline *
! make_gline(char *user, char *host, char *reason, time_t expire, time_t lastmod,
! unsigned int flags)
{
struct Gline *gline, *sgline, *after = 0;
***************
*** 116,121 ****
else if ((gline->gl_flags & GLINE_LOCAL) != (flags & GLINE_LOCAL))
continue;
! else if (!mmatch(gline->gl_nick, nick) && /* gline contains new mask */
! !mmatch(gline->gl_user, user) &&
!mmatch(gline->gl_host, host)) {
if (expire <= gline->gl_expire) /* will expire before wider gline */
--- 100,104 ----
else if ((gline->gl_flags & GLINE_LOCAL) != (flags & GLINE_LOCAL))
continue;
! else if (!mmatch(gline->gl_user, user) && /* gline contains new mask */
!mmatch(gline->gl_host, host)) {
if (expire <= gline->gl_expire) /* will expire before wider gline */
***************
*** 123,128 ****
else
after = gline; /* stick new gline after this one */
! } else if (!mmatch(nick, gline->gl_nick) && /* new mask contains gline */
! !mmatch(user, gline->gl_user) &&
!mmatch(host, gline->gl_host) &&
gline->gl_expire <= expire) /* gline expires before new one */
--- 106,110 ----
else
after = gline; /* stick new gline after this one */
! } else if (!mmatch(user, gline->gl_user) && /* new mask contains gline */
!mmatch(host, gline->gl_host) &&
gline->gl_expire <= expire) /* gline expires before new one */
***************
*** 141,145 ****
if (flags & GLINE_BADCHAN) { /* set a BADCHAN gline */
DupString(gline->gl_user, user); /* first, remember channel */
- gline->gl_nick = 0;
gline->gl_host = 0;
--- 123,126 ----
***************
*** 152,157 ****
} else {
! DupString(gline->gl_nick, nick); /* remember them... */
! DupString(gline->gl_user, user);
DupString(gline->gl_host, host);
--- 133,137 ----
} else {
! DupString(gline->gl_user, user); /* remember them... */
DupString(gline->gl_host, host);
***************
*** 271,278 ****
continue;
- if (cli_name(acptr) &&
- match (gline->gl_nick, cli_name(acptr)) != 0)
- continue;
-
if (cli_user(acptr)->username &&
match (gline->gl_user, (cli_user(acptr))->realusername) != 0)
--- 251,254 ----
***************
*** 377,385 ****
if (gline->gl_lastmod)
! sendcmdto_serv_butone(sptr, CMD_GLINE, cptr, "* %c%s%s%s%s%s %Tu %Tu :%s",
! GlineIsRemActive(gline) ? '+' : '-',
! GlineIsBadChan(gline) ? "" : gline->gl_nick,
! GlineIsBadChan(gline) ? "" : "!",
! gline->gl_user,
GlineIsBadChan(gline) ? "" : "@",
GlineIsBadChan(gline) ? "" : gline->gl_host,
--- 353,358 ----
if (gline->gl_lastmod)
! sendcmdto_serv_butone(sptr, CMD_GLINE, cptr, "* %c%s%s%s %Tu %Tu :%s",
! GlineIsRemActive(gline) ? '+' : '-', gline->gl_user,
GlineIsBadChan(gline) ? "" : "@",
GlineIsBadChan(gline) ? "" : gline->gl_host,
***************
*** 389,395 ****
sendcmdto_serv_butone(sptr, CMD_GLINE, cptr,
(GlineIsRemActive(gline) ?
! "* +%s%s%s%s%s %Tu :%s" : "* -%s%s%s%s%s"),
! GlineIsBadChan(gline) ? "" : gline->gl_nick,
! GlineIsBadChan(gline) ? "" : "!",
gline->gl_user, GlineIsBadChan(gline) ? "" : "@",
GlineIsBadChan(gline) ? "" : gline->gl_host,
--- 362,366 ----
sendcmdto_serv_butone(sptr, CMD_GLINE, cptr,
(GlineIsRemActive(gline) ?
! "* +%s%s%s %Tu :%s" : "* -%s%s%s"),
gline->gl_user, GlineIsBadChan(gline) ? "" : "@",
GlineIsBadChan(gline) ? "" : gline->gl_host,
***************
*** 404,409 ****
{
struct Gline *agline;
! char uhmask[NICKLEN + USERLEN + HOSTLEN + 3];
! char *nick, *user, *host;
int tmp;
--- 375,380 ----
{
struct Gline *agline;
! char uhmask[USERLEN + HOSTLEN + 2];
! char *user, *host;
int tmp;
***************
*** 429,435 ****
host = 0;
} else {
! canon_userhost(userhost, &nick, &user, &host, "*");
if (sizeof(uhmask) <
! ircd_snprintf(0, uhmask, sizeof(uhmask), "%s!%s@%s", nick, user, host))
return send_reply(sptr, ERR_LONGMASK);
else if (MyUser(sptr) || (IsUser(sptr) && flags & GLINE_LOCAL)) {
--- 400,406 ----
host = 0;
} else {
! canon_userhost(userhost, &user, &host, "*");
if (sizeof(uhmask) <
! ircd_snprintf(0, uhmask, sizeof(uhmask), "%s@%s", user, host))
return send_reply(sptr, ERR_LONGMASK);
else if (MyUser(sptr) || (IsUser(sptr) && flags & GLINE_LOCAL)) {
***************
*** 464,476 ****
/* Inform ops... */
sendto_opmask_butone(0, ircd_strncmp(reason, "AUTO", 4) ? SNO_GLINE :
! SNO_AUTO, "%s adding %s %s for %s%s%s%s%s, expiring at "
"%Tu: %s",
feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr) ?
cli_name(sptr) : cli_name((cli_user(sptr))->server),
flags & GLINE_LOCAL ? "local" : "global",
! flags & GLINE_BADCHAN ? "BADCHAN" : "GLINE",
! flags & GLINE_BADCHAN ? "" : nick,
! flags & GLINE_BADCHAN ? "" : "!",
! user,
flags & GLINE_BADCHAN ? "" : "@",
flags & GLINE_BADCHAN ? "" : host,
--- 435,444 ----
/* Inform ops... */
sendto_opmask_butone(0, ircd_strncmp(reason, "AUTO", 4) ? SNO_GLINE :
! SNO_AUTO, "%s adding %s %s for %s%s%s, expiring at "
"%Tu: %s",
feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr) ?
cli_name(sptr) : cli_name((cli_user(sptr))->server),
flags & GLINE_LOCAL ? "local" : "global",
! flags & GLINE_BADCHAN ? "BADCHAN" : "GLINE", user,
flags & GLINE_BADCHAN ? "" : "@",
flags & GLINE_BADCHAN ? "" : host,
***************
*** 479,492 ****
/* and log it */
log_write(LS_GLINE, L_INFO, LOG_NOSNOTICE,
! "%#C adding %s %s for %s%s%s, expiring at %Tu: %s", sptr,
flags & GLINE_LOCAL ? "local" : "global",
! flags & GLINE_BADCHAN ? "BADCHAN" : "GLINE",
! flags & GLINE_BADCHAN ? "" : nick,
! flags & GLINE_BADCHAN ? "" : "!",
! userhost,
expire + TSoffset, reason);
/* make the gline */
! agline = make_gline(nick, user, host, reason, expire, lastmod, flags);
if (!agline) /* if it overlapped, silently return */
--- 447,457 ----
/* and log it */
log_write(LS_GLINE, L_INFO, LOG_NOSNOTICE,
! "%#C adding %s %s for %s, expiring at %Tu: %s", sptr,
flags & GLINE_LOCAL ? "local" : "global",
! flags & GLINE_BADCHAN ? "BADCHAN" : "GLINE", userhost,
expire + TSoffset, reason);
/* make the gline */
! agline = make_gline(user, host, reason, expire, lastmod, flags);
if (!agline) /* if it overlapped, silently return */
***************
*** 525,535 ****
/* Inform ops and log it */
! sendto_opmask_butone(0, SNO_GLINE, "%s activating global %s for %s%s%s%s%s, "
"expiring at %Tu: %s",
feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr) ?
cli_name(sptr) : cli_name((cli_user(sptr))->server),
GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
- GlineIsBadChan(gline) ? "" : gline->gl_nick,
- GlineIsBadChan(gline) ? "" : "!",
gline->gl_user, GlineIsBadChan(gline) ? "" : "@",
GlineIsBadChan(gline) ? "" : gline->gl_host,
--- 490,498 ----
/* Inform ops and log it */
! sendto_opmask_butone(0, SNO_GLINE, "%s activating global %s for %s%s%s, "
"expiring at %Tu: %s",
feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr) ?
cli_name(sptr) : cli_name((cli_user(sptr))->server),
GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
gline->gl_user, GlineIsBadChan(gline) ? "" : "@",
GlineIsBadChan(gline) ? "" : gline->gl_host,
***************
*** 537,545 ****
log_write(LS_GLINE, L_INFO, LOG_NOSNOTICE,
! "%#C activating global %s for %s%s%s%s%s, expiring at %Tu: %s", sptr,
! GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
! GlineIsBadChan(gline) ? "" : gline->gl_nick,
! GlineIsBadChan(gline) ? "" : "!",
! gline->gl_user,
GlineIsBadChan(gline) ? "" : "@",
GlineIsBadChan(gline) ? "" : gline->gl_host,
--- 500,505 ----
log_write(LS_GLINE, L_INFO, LOG_NOSNOTICE,
! "%#C activating global %s for %s%s%s, expiring at %Tu: %s", sptr,
! GlineIsBadChan(gline) ? "BADCHAN" : "GLINE", gline->gl_user,
GlineIsBadChan(gline) ? "" : "@",
GlineIsBadChan(gline) ? "" : gline->gl_host,
***************
*** 589,599 ****
/* Inform ops and log it */
! sendto_opmask_butone(0, SNO_GLINE, "%s %s %s for %s%s%s%s%s, expiring at %Tu: "
"%s",
feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr) ?
cli_name(sptr) : cli_name((cli_user(sptr))->server),
msg, GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
- GlineIsBadChan(gline) ? "" : gline->gl_nick,
- GlineIsBadChan(gline) ? "" : "!",
gline->gl_user, GlineIsBadChan(gline) ? "" : "@",
GlineIsBadChan(gline) ? "" : gline->gl_host,
--- 549,557 ----
/* Inform ops and log it */
! sendto_opmask_butone(0, SNO_GLINE, "%s %s %s for %s%s%s, expiring at %Tu: "
"%s",
feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr) ?
cli_name(sptr) : cli_name((cli_user(sptr))->server),
msg, GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
gline->gl_user, GlineIsBadChan(gline) ? "" : "@",
GlineIsBadChan(gline) ? "" : gline->gl_host,
***************
*** 601,609 ****
log_write(LS_GLINE, L_INFO, LOG_NOSNOTICE,
! "%#C %s %s for %s%s%s%s%s, expiring at %Tu: %s", sptr, msg,
! GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
! GlineIsBadChan(gline) ? "" : gline->gl_nick,
! GlineIsBadChan(gline) ? "" : "!",
! gline->gl_user,
GlineIsBadChan(gline) ? "" : "@",
GlineIsBadChan(gline) ? "" : gline->gl_host,
--- 559,564 ----
log_write(LS_GLINE, L_INFO, LOG_NOSNOTICE,
! "%#C %s %s for %s%s%s, expiring at %Tu: %s", sptr, msg,
! GlineIsBadChan(gline) ? "BADCHAN" : "GLINE", gline->gl_user,
GlineIsBadChan(gline) ? "" : "@",
GlineIsBadChan(gline) ? "" : gline->gl_host,
***************
*** 625,629 ****
struct Gline *gline;
struct Gline *sgline;
! char *nick, *user, *host, *t_uh;
if (flags & (GLINE_BADCHAN | GLINE_ANY)) {
--- 580,584 ----
struct Gline *gline;
struct Gline *sgline;
! char *user, *host, *t_uh;
if (flags & (GLINE_BADCHAN | GLINE_ANY)) {
***************
*** 651,655 ****
DupString(t_uh, userhost);
! canon_userhost(t_uh, &nick, &user, &host, 0);
if(BadPtr(user))
--- 606,610 ----
DupString(t_uh, userhost);
! canon_userhost(t_uh, &user, &host, 0);
if(BadPtr(user))
***************
*** 666,680 ****
else if (flags & GLINE_EXACT) {
if (ircd_strcmp(gline->gl_host, host) == 0 &&
! ((!user && ircd_strcmp(gline->gl_user, "*") == 0) ||
! (user && ircd_strcmp(gline->gl_user, user) == 0)) &&
! ((!nick && ircd_strcmp(gline->gl_nick, "*") == 0) ||
! (nick && ircd_strcmp(gline->gl_nick, nick) == 0)))
break;
} else {
if (match(gline->gl_host, host) == 0 &&
! ((!user && ircd_strcmp(gline->gl_user, "*") == 0) ||
! (user && match(gline->gl_user, user) == 0)) &&
! ((!nick && ircd_strcmp(gline->gl_nick, "*") == 0) ||
! (nick && (match(gline->gl_nick, nick) == 0))))
break;
}
--- 621,631 ----
else if (flags & GLINE_EXACT) {
if (ircd_strcmp(gline->gl_host, host) == 0 &&
! ((!user && ircd_strcmp(gline->gl_user, "*") == 0) ||
! ircd_strcmp(gline->gl_user, user) == 0))
break;
} else {
if (match(gline->gl_host, host) == 0 &&
! ((!user && ircd_strcmp(gline->gl_user, "*") == 0) ||
! match(gline->gl_user, user) == 0))
break;
}
***************
*** 704,710 ****
continue;
- if (match(gline->gl_nick, cli_name(cptr)) != 0)
- continue;
-
if (match(gline->gl_user, (cli_user(cptr))->realusername) != 0)
continue;
--- 655,658 ----
***************
*** 736,741 ****
gline->gl_next->gl_prev_p = gline->gl_prev_p;
- if (gline->gl_nick)
- MyFree(gline->gl_nick);
MyFree(gline->gl_user); /* free up the memory */
if (gline->gl_host)
--- 684,687 ----
***************
*** 757,762 ****
gline_free(gline);
else if (!GlineIsLocal(gline) && gline->gl_lastmod)
! sendcmdto_one(&me, CMD_GLINE, cptr, "* %c%s!%s@%s %Tu %Tu :%s",
! GlineIsRemActive(gline) ? '+' : '-', gline->gl_nick, gline->gl_user,
gline->gl_host, gline->gl_expire - CurrentTime,
gline->gl_lastmod, gline->gl_reason);
--- 703,708 ----
gline_free(gline);
else if (!GlineIsLocal(gline) && gline->gl_lastmod)
! sendcmdto_one(&me, CMD_GLINE, cptr, "* %c%s@%s %Tu %Tu :%s",
! GlineIsRemActive(gline) ? '+' : '-', gline->gl_user,
gline->gl_host, gline->gl_expire - CurrentTime,
gline->gl_lastmod, gline->gl_reason);
***************
*** 782,790 ****
return 0;
! sendcmdto_one(&me, CMD_GLINE, cptr, "* %c%s%s%s%s%s %Tu %Tu :%s",
! GlineIsRemActive(gline) ? '+' : '-',
! GlineIsBadChan(gline) ? "" : gline->gl_nick,
! GlineIsBadChan(gline) ? "" : "!",
! gline->gl_user, GlineIsBadChan(gline) ? "" : "@",
GlineIsBadChan(gline) ? "" : gline->gl_host,
gline->gl_expire - CurrentTime, gline->gl_lastmod,
--- 728,734 ----
return 0;
! sendcmdto_one(&me, CMD_GLINE, cptr, "* %c%s%s%s %Tu %Tu :%s",
! GlineIsRemActive(gline) ? '+' : '-', gline->gl_user,
! GlineIsBadChan(gline) ? "" : "@",
GlineIsBadChan(gline) ? "" : gline->gl_host,
gline->gl_expire - CurrentTime, gline->gl_lastmod,
***************
*** 805,812 ****
/* send gline information along */
! send_reply(sptr, RPL_GLIST,
! GlineIsBadChan(gline) ? "" : gline->gl_nick,
! GlineIsBadChan(gline) ? "" : "!",
! gline->gl_user, GlineIsBadChan(gline) ? "" : "@",
GlineIsBadChan(gline) ? "" : gline->gl_host,
gline->gl_expire + TSoffset,
--- 749,754 ----
/* send gline information along */
! send_reply(sptr, RPL_GLIST, gline->gl_user,
! GlineIsBadChan(gline) ? "" : "@",
GlineIsBadChan(gline) ? "" : gline->gl_host,
gline->gl_expire + TSoffset,
***************
*** 820,825 ****
gline_free(gline);
else
! send_reply(sptr, RPL_GLIST, gline->gl_nick, "!", gline->gl_user, "@",
! gline->gl_host, gline->gl_expire + TSoffset,
GlineIsLocal(gline) ? cli_name(&me) : "*",
GlineIsActive(gline) ? '+' : '-', gline->gl_reason);
--- 762,767 ----
gline_free(gline);
else
! send_reply(sptr, RPL_GLIST, gline->gl_user, "@", gline->gl_host,
! gline->gl_expire + TSoffset,
GlineIsLocal(gline) ? cli_name(&me) : "*",
GlineIsActive(gline) ? '+' : '-', gline->gl_reason);
***************
*** 832,836 ****
gline_free(gline);
else
! send_reply(sptr, RPL_GLIST, "", "", gline->gl_user, "", "",
gline->gl_expire + TSoffset,
GlineIsLocal(gline) ? cli_name(&me) : "*",
--- 774,778 ----
gline_free(gline);
else
! send_reply(sptr, RPL_GLIST, gline->gl_user, "", "",
gline->gl_expire + TSoffset,
GlineIsLocal(gline) ? cli_name(&me) : "*",
***************
*** 855,859 ****
gline_free(gline);
else
! send_reply(sptr, RPL_STATSGLINE, 'G', gline->gl_nick, "!", gline->gl_user, gline->gl_host,
gline->gl_expire + TSoffset, gline->gl_reason);
}
--- 797,801 ----
gline_free(gline);
else
! send_reply(sptr, RPL_STATSGLINE, 'G', gline->gl_user, gline->gl_host,
gline->gl_expire + TSoffset, gline->gl_reason);
}
***************
*** 869,873 ****
gl++;
gl_size += sizeof(struct Gline);
- gl_size += gline->gl_nick ? (strlen(gline->gl_nick) + 1) : 0;
gl_size += gline->gl_user ? (strlen(gline->gl_user) + 1) : 0;
gl_size += gline->gl_host ? (strlen(gline->gl_host) + 1) : 0;
--- 811,814 ----
***************
*** 875,917 ****
}
return gl;
- }
-
- struct Gline *
- IsNickGlined(struct Client *cptr, char *nick)
- {
- struct Gline *gline;
- struct Gline *sgline;
-
- for (gline = GlobalGlineList; gline; gline = sgline) {
- sgline = gline->gl_next;
-
- if (gline->gl_expire <= CurrentTime) {
- gline_free(gline);
- continue;
- }
-
- if (!ircd_strcmp(gline->gl_nick, "*")) /* skip glines w. wildcarded nick */
- continue;
-
- if (match(gline->gl_nick, nick) != 0)
- continue;
-
- if (match(gline->gl_user, (cli_user(cptr))->username) != 0)
- continue;
-
- if (GlineIsIpMask(gline)) {
- Debug((DEBUG_DEBUG,"IP gline: %08x %08x/%i",(cli_ip(cptr)).s_addr,gline->ipnum.s_addr,gline->bits));
- if (((cli_ip(cptr)).s_addr & NETMASK(gline->bits)) != gline->ipnum.s_addr)
- continue;
- }
- else {
- if (match(gline->gl_host, (cli_user(cptr))->realhost) != 0)
- continue;
- }
- return gline;
- }
- /*
- * No Glines matched
- */
- return 0;
}
--- 816,818 ----
Index: ircd_features.c
===================================================================
RCS file: /cvsroot/genericircd/gircd2.0/ircd/ircd_features.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ircd_features.c 25 Oct 2003 20:30:24 -0000 1.3
--- ircd_features.c 26 Oct 2003 16:56:26 -0000 1.4
***************
*** 260,263 ****
--- 260,264 ----
F_B(USERCLOAK, 0, 1, 0),
F_S(USER_CLOAK_HOST, FEAT_CASE, "cloak.genericnet.org", 0),
+ F_B(WHOIS_SERVICES, 0, 0, 0),
/* features that probably should not be touched */
Index: m_nick.c
===================================================================
RCS file: /cvsroot/genericircd/gircd2.0/ircd/m_nick.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** m_nick.c 12 Jul 2003 20:08:40 -0000 1.1.1.1
--- m_nick.c 26 Oct 2003 16:56:26 -0000 1.2
***************
*** 97,101 ****
#include "s_user.h"
#include "send.h"
- #include "gline.h"
#include <assert.h>
--- 97,100 ----
***************
*** 179,194 ****
if (0 == do_nick_name(nick)) {
send_reply(sptr, ERR_ERRONEUSNICKNAME, arg);
- return 0;
- }
-
- /*
- * - ASUKA ---------------------------------------------------------------------
- * Check, if there's an active nick gline matching the new nick.
- *
- * froo (fr...@qu...) - 2002/08/21
- * -----------------------------------------------------------------------------
- */
- if (IsRegistered(sptr) && !IsAnOper(sptr) && IsNickGlined(sptr, nick)) {
- send_reply(sptr, ERR_ERRONEUSNICKNAME, nick);
return 0;
}
--- 178,181 ----
Index: m_whois.c
===================================================================
RCS file: /cvsroot/genericircd/gircd2.0/ircd/m_whois.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** m_whois.c 12 Jul 2003 20:08:47 -0000 1.1.1.1
--- m_whois.c 26 Oct 2003 16:56:26 -0000 1.2
***************
*** 218,221 ****
--- 218,224 ----
* probably a good place to add them :)
*/
+
+ if (IsChannelService(acptr) && feature_bool(FEAT_WHOIS_SERVICES))
+ send_reply(sptr, RPL_WHOISSERVICE, name);
if (MyConnect(acptr) &&
Index: s_err.c
===================================================================
RCS file: /cvsroot/genericircd/gircd2.0/ircd/s_err.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** s_err.c 11 Oct 2003 13:59:19 -0000 1.2
--- s_err.c 26 Oct 2003 16:56:26 -0000 1.3
***************
*** 527,531 ****
{ RPL_STATSTLINE, "%c %s %s", "246" },
/* 247 */
! { RPL_STATSGLINE, "%c %s%s%s@%s %Tu :%s", "247" },
/* 248 */
{ RPL_STATSULINE, "%c %s %s %s %d %d", "248" },
--- 527,531 ----
{ RPL_STATSTLINE, "%c %s %s", "246" },
/* 247 */
! { RPL_STATSGLINE, "%c %s@%s %Tu :%s", "247" },
/* 248 */
{ RPL_STATSULINE, "%c %s %s %s %d %d", "248" },
***************
*** 593,597 ****
{ 0 },
/* 280 */
! { RPL_GLIST, "%s%s%s%s%s %Tu %s %c :%s", "280" },
/* 281 */
{ RPL_ENDOFGLIST, ":End of G-line List", "281" },
--- 593,597 ----
{ 0 },
/* 280 */
! { RPL_GLIST, "%s%s%s %Tu %s %c :%s", "280" },
/* 281 */
{ RPL_ENDOFGLIST, ":End of G-line List", "281" },
***************
*** 653,657 ****
{ 0 },
/* 310 */
! { 0 },
/* 311 */
{ RPL_WHOISUSER, "%s %s %s * :%s", "311" },
--- 653,657 ----
{ 0 },
/* 310 */
! { RPL_WHOISSERVICE, "%s :is a Network Service", "310" },
/* 311 */
{ RPL_WHOISUSER, "%s %s %s * :%s", "311" },
Index: s_user.c
===================================================================
RCS file: /cvsroot/genericircd/gircd2.0/ircd/s_user.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** s_user.c 25 Oct 2003 20:30:24 -0000 1.3
--- s_user.c 26 Oct 2003 16:56:26 -0000 1.4
***************
*** 366,370 ****
struct User* user = cli_user(sptr);
char ip_base64[8];
- int killreason;
user->last = CurrentTime;
--- 366,369 ----
***************
*** 448,455 ****
* following block for the benefit of time-dependent K:-lines
*/
! if ((killreason=find_kill(sptr))) {
ServerStats->is_ref++;
IPcheck_connect_fail(cli_ip(sptr));
! return exit_client(cptr, sptr, &me, (killreason==-2) ? "G-lined" : "K-lined");
}
/*
--- 447,454 ----
* following block for the benefit of time-dependent K:-lines
*/
! if (find_kill(sptr)) {
ServerStats->is_ref++;
IPcheck_connect_fail(cli_ip(sptr));
! return exit_client(cptr, sptr, &me, "K-lined");
}
/*
Index: whocmds.c
===================================================================
RCS file: /cvsroot/genericircd/gircd2.0/ircd/whocmds.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** whocmds.c 12 Jul 2003 20:09:01 -0000 1.1.1.1
--- whocmds.c 26 Oct 2003 16:56:26 -0000 1.2
***************
*** 258,262 ****
struct Client *acptr;
int count = 0;
! char namebuf[NICKLEN + USERLEN + HOSTLEN + 3];
char ipbuf[USERLEN + 16 + 2];
--- 258,262 ----
struct Client *acptr;
int count = 0;
! char namebuf[USERLEN + HOSTLEN + 2];
char ipbuf[USERLEN + 16 + 2];
***************
*** 265,272 ****
continue;
! ircd_snprintf(0, namebuf, sizeof(namebuf), "%s!%s@%s", cli_name(acptr),
cli_user(acptr)->username, cli_user(acptr)->host);
! ircd_snprintf(0, ipbuf, sizeof(ipbuf), "%s!%s@%s", cli_name(acptr),
! cli_user(acptr)->username, ircd_ntoa((const char *) &(cli_ip(acptr))));
if (!match(mask, namebuf) || !match(mask, ipbuf))
--- 265,272 ----
continue;
! ircd_snprintf(0, namebuf, sizeof(namebuf), "%s@%s",
cli_user(acptr)->username, cli_user(acptr)->host);
! ircd_snprintf(0, ipbuf, sizeof(ipbuf), "%s@%s", cli_user(acptr)->username,
! ircd_ntoa((const char *) &(cli_ip(acptr))));
if (!match(mask, namebuf) || !match(mask, ipbuf))
|