diff --git a/Changes b/Changes index a37b975ff..3dd48e9a4 100644 --- a/Changes +++ b/Changes @@ -1558,3 +1558,5 @@ seen. gmtime warning still there - Fixed problem where SSL handshakes weren't unknown--'ed on remove reported by Alzirr - Compile fix regarding above fix +- Added vhost::swhois requested by FrostByghte (#0000171) + diff --git a/include/struct.h b/include/struct.h index 5fad0c825..7d7f6cbbd 100644 --- a/include/struct.h +++ b/include/struct.h @@ -965,7 +965,7 @@ struct _configitem_vhost { ConfigItem *prev, *next; ConfigFlag flag; ConfigItem *from; - char *login, *virthost, *virtuser; + char *login, *virthost, *virtuser, *swhois; anAuthStruct *auth; }; diff --git a/src/modules/m_vhost.c b/src/modules/m_vhost.c index 14f117d70..99c8676d3 100644 --- a/src/modules/m_vhost.c +++ b/src/modules/m_vhost.c @@ -182,6 +182,14 @@ int m_vhost(aClient *cptr, aClient *sptr, int parc, char *parv[]) "%s", vhost->virthost); sendto_one(sptr, ":%s MODE %s :+tx", sptr->name, sptr->name); + if (vhost->swhois) { + if (sptr->user->swhois) + MyFree(sptr->user->swhois); + sptr->user->swhois = MyMalloc(strlen(vhost->swhois) +1); + strcpy(sptr->user->swhois, vhost->swhois); + sendto_serv_butone_token(cptr, sptr->name, + MSG_SWHOIS, TOK_SWHOIS, "%s :%s", sptr->name, vhost->swhois); + } sendto_one(sptr, ":%s NOTICE %s :*** Your vhost is now %s%s%s", me.name, sptr->name, vhost->virtuser ? vhost->virtuser : "", diff --git a/src/s_conf.c b/src/s_conf.c index 4345704d5..16df11355 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -1941,6 +1941,10 @@ int _conf_vhost(ConfigFile *conf, ConfigEntry *ce) vhost->virthost = strdup(host); } } + else if (!stricmp(cep->ce_varname, "swhois")) + { + vhost->swhois = strdup(cep->ce_vardata); + } else if (!strcmp(cep->ce_varname, "from")) { for (cepp = cep->ce_entries; cepp; cepp = cepp->ce_next)