diff options
| author | 2006-08-25 13:42:19 +0000 | |
|---|---|---|
| committer | 2006-08-25 13:42:19 +0000 | |
| commit | a93e436b039fa86345759b9a29243fe09fb54bcf (patch) | |
| tree | abf035468c0f2e1c11fa2cbd55b28cd632a21912 /src/users.cpp | |
| parent | Added leachim's +qa prefix patch (diff) | |
Add <options:cyclehosts> which allows a user to appear to have quit when their host changes, so that clients/bots can stay synched properly.
It is recommended this option always be on.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5017 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
| -rw-r--r-- | src/users.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/users.cpp b/src/users.cpp index 085440367..031333dfc 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -1632,8 +1632,24 @@ bool userrec::ChangeDisplayedHost(const char* host) return false; FOREACH_MOD(I_OnChangeHost,OnChangeHost(this,host)); } + if (this->ServerInstance->Config->CycleHosts) + this->WriteCommonExcept("QUIT :Changing hosts"); + strlcpy(this->dhost,host,63); + if (this->ServerInstance->Config->CycleHosts) + { + for (std::vector<ucrec*>::const_iterator i = this->chans.begin(); i != this->chans.end(); i++) + { + if ((*i)->channel) + { + (*i)->channel->WriteAllExceptSender(this, 0, "JOIN %s", (*i)->channel->name); + (*i)->channel->WriteChannelWithServ(this->ServerInstance->Config->ServerName, "MODE %s +%s", + (*i)->channel->name, this->ServerInstance->Modes->ModeString(this, (*i)->channel).c_str()); + } + } + } + if (IS_LOCAL(this)) this->WriteServ("396 %s %s :is now your hidden host",this->nick,this->dhost); |
