From 1a124bb23ab6b04ced9e2fb762423a0260882841 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 25 Aug 2006 19:02:18 +0000 Subject: Add userrec::ChangeIdent (which we were missing) which can emulate the quit/rejoin same as ChangeDisplayedHost git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5022 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 031333dfc..0a213c429 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -1656,6 +1656,29 @@ bool userrec::ChangeDisplayedHost(const char* host) return true; } +bool userrec::ChangeIdent(const char* newident) +{ + if (this->ServerInstance->Config->CycleHosts) + this->WriteCommonExcept("QUIT :Changing ident"); + + strlcpy(this->ident, newident, IDENTMAX+2); + + if (this->ServerInstance->Config->CycleHosts) + { + for (std::vector::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()); + } + } + } + + return true; +} + void userrec::NoticeAll(char* text, ...) { char textbuffer[MAXBUF]; -- cgit v1.3.1-10-gc9f91