fix CMD_MESSAGE handling

This commit is contained in:
Michael Davidsaver
2022-10-11 15:42:54 -07:00
parent 7610575c50
commit 0eea8fd1c7
3 changed files with 44 additions and 8 deletions
+6 -8
View File
@@ -308,16 +308,14 @@ void ServerConn::handle_MESSAGE()
Level lvl;
switch(mtype) {
case 0: lvl = Level::Info;
case 1: lvl = Level::Warn;
case 2: lvl = Level::Err;
default:lvl = Level::Crit;
case 0: lvl = Level::Info; break;
case 1: lvl = Level::Warn; break;
case 2: lvl = Level::Err; break;
default: lvl = Level::Crit; break;
}
if(remote.test(lvl))
errlogPrintf("Client %s Channel %s Remote message: %s\n",
peerName.c_str(), chan ? "<dead>" : chan->name.c_str(),
msg.c_str());
log_printf(remote, lvl, "%s : %s\n",
chan ? chan->name.c_str() : "<dead>", msg.c_str());
}
std::shared_ptr<ConnBase> ServerConn::self_from_this()