mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-02 04:26:38 +02:00
Fixed a bug where an ident in a vhost {} was never sent out to other servers and added user@host support for set::hosts
This commit is contained in:
+13
-1
@@ -270,7 +270,19 @@ DLLFUNC int m_oper(aClient *cptr, aClient *sptr, int parc, char *parv[]) {
|
||||
|
||||
sptr->oflag = aconf->oflags;
|
||||
if ((aconf->oflags & OFLAG_HIDE) && iNAH && !BadPtr(host)) {
|
||||
iNAH_host(sptr, host);
|
||||
char *c;
|
||||
char *vhost = host;
|
||||
|
||||
if ((c = strchr(host, '@')))
|
||||
{
|
||||
vhost = c+1;
|
||||
strncpy(sptr->user->username, host, c-host);
|
||||
sptr->user->username[c-host] = 0;
|
||||
sendto_serv_butone_token(NULL, sptr->name, MSG_SETIDENT,
|
||||
TOK_SETIDENT, "%s",
|
||||
sptr->user->username);
|
||||
}
|
||||
iNAH_host(sptr, vhost);
|
||||
SetHidden(sptr);
|
||||
} else
|
||||
if (IsHidden(sptr) && !sptr->user->virthost) {
|
||||
|
||||
@@ -175,12 +175,14 @@ int m_vhost(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
if (vhost->virtuser) {
|
||||
strcpy(olduser, sptr->user->username);
|
||||
strlcpy(sptr->user->username, vhost->virtuser, USERLEN);
|
||||
sendto_serv_butone_token(cptr, sptr->name, MSG_SETIDENT, TOK_SETIDENT,
|
||||
"%s", sptr->user->username);
|
||||
}
|
||||
sptr->umodes |= UMODE_HIDE;
|
||||
sptr->umodes |= UMODE_SETHOST;
|
||||
sendto_serv_butone_token(cptr, sptr->name,
|
||||
MSG_SETHOST, TOK_SETHOST,
|
||||
"%s", vhost->virthost);
|
||||
"%s", sptr->user->virthost);
|
||||
sendto_one(sptr, ":%s MODE %s :+tx",
|
||||
sptr->name, sptr->name);
|
||||
if (vhost->swhois) {
|
||||
|
||||
Reference in New Issue
Block a user