Improve the handling of module load messages

Instead of doing ugly stuff to shorten the "Loaded Module [foo]" message, we now
just always generate the shorter version of that message. The code paths which
didn't do this shortening now prepend that message themselves.

The result is that every message looks the same as it did before, but the code
for generating these is a little nicer.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter
2011-04-02 16:52:52 +02:00
parent 2003465489
commit f0bf7134ec
6 changed files with 8 additions and 30 deletions

View File

@@ -731,10 +731,8 @@ void CClient::UserCommand(CString& sLine) {
b = m_pUser->GetModules().LoadModule(sMod, sArgs, m_pUser, sModRet);
}
if (!b) {
PutStatus(sModRet);
return;
}
if (b)
sModRet = "Loaded module [" + sMod + "] " + sModRet;
PutStatus(sModRet);
return;