1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-06 04:33:13 +02:00

- Added allow-userhost-change checks to /vhost.

Fixed Changes typo from me (forced-rejoin -> force-rejoin)
This commit is contained in:
Bram Matthys
2003-02-27 18:41:26 +00:00
parent 41e06cba28
commit 06eaede3f2
2 changed files with 28 additions and 1 deletions
+2 -1
View File
@@ -1945,5 +1945,6 @@ seen. gmtime warning still there
- Fixed /rehash stall caused by delayed unloading of the scan module (deadlock).
- Added feature that if the chan is +m AND +u (so both!) and you ban IRC!*@* then ops
will no longer see the "relayed" message from IRC.
- Made set::allow-userhost-change forced-rejoin work.
- Made set::allow-userhost-change force-rejoin work.
- Fixed chmode +u bug when chanop was parting but wasn't sent to normal users.
- Added allow-userhost-change checks to /vhost.
+26
View File
@@ -162,6 +162,30 @@ int m_vhost(aClient *cptr, aClient *sptr, int parc, char *parv[])
if (i > 0)
{
char olduser[USERLEN+1];
switch (UHOST_ALLOWED)
{
case UHALLOW_NEVER:
if (MyClient(sptr))
{
sendto_one(sptr, ":%s NOTICE %s :*** /vhost is disabled", me.name, sptr->name);
return 0;
}
break;
case UHALLOW_ALWAYS:
break;
case UHALLOW_NOCHANS:
if (MyClient(sptr) && sptr->user->joined)
{
sendto_one(sptr, ":%s NOTICE %s :*** /vhost can not be used while you are on a channel", me.name, sptr->name);
return 0;
}
break;
case UHALLOW_REJOIN:
rejoin_doparts(sptr);
/* join sent later when the host has been changed */
break;
}
if (sptr->user->virthost)
{
MyFree(sptr->user->virthost);
@@ -200,6 +224,8 @@ int m_vhost(aClient *cptr, aClient *sptr, int parc, char *parv[])
vhost->virtuser ? olduser : sptr->user->username,
sptr->user->realhost, vhost->virtuser ? vhost->virtuser : "",
vhost->virtuser ? "@" : "", vhost->virthost);
if (UHOST_ALLOWED == UHALLOW_REJOIN)
rejoin_dojoinandmode(sptr);
return 0;
}
if (i == -1)