aboutsummaryrefslogtreecommitdiffstats
path: root/src/users.cpp
diff options
context:
space:
mode:
authorGravatar attilamolnar2013-05-24 18:22:25 +0200
committerGravatar attilamolnar2013-05-24 18:22:25 +0200
commit1911857e3a566bd7907492a6718ae620d70959ba (patch)
tree180ece588d91af6dcacbc6a752f81407a213c0a0 /src/users.cpp
parentRemove dead ModeParser code (diff)
Cache mode list that is sent in the 004 numeric
Deduplicate UserModeList(), ChannelModeList() and ParaModeList() code
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 7e1df61fe..49c5c5e42 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -731,10 +731,8 @@ void LocalUser::FullConnect()
this->WriteNumeric(RPL_YOURHOSTIS, "%s :Your host is %s, running version %s",this->nick.c_str(),ServerInstance->Config->ServerName.c_str(),BRANCH);
this->WriteNumeric(RPL_SERVERCREATED, "%s :This server was created %s %s", this->nick.c_str(), __TIME__, __DATE__);
- std::string umlist = ServerInstance->Modes->UserModeList();
- std::string cmlist = ServerInstance->Modes->ChannelModeList();
- std::string pmlist = ServerInstance->Modes->ParaModeList();
- this->WriteNumeric(RPL_SERVERVERSION, "%s %s %s %s %s %s", this->nick.c_str(), ServerInstance->Config->ServerName.c_str(), BRANCH, umlist.c_str(), cmlist.c_str(), pmlist.c_str());
+ const std::string& modelist = ServerInstance->Modes->GetModeListFor004Numeric();
+ this->WriteNumeric(RPL_SERVERVERSION, "%s %s %s %s", this->nick.c_str(), ServerInstance->Config->ServerName.c_str(), BRANCH, modelist.c_str());
ServerInstance->ISupport.SendTo(this);
this->WriteNumeric(RPL_YOURUUID, "%s %s :your unique ID", this->nick.c_str(), this->uuid.c_str());