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:
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user