- c->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :User %s is KNOCKing on %s (%s)", c->name.c_str(), user->nick.c_str(), c->name.c_str(), parameters[1].c_str());
- user->WriteServ("NOTICE %s :KNOCKing on %s", user->nick.c_str(), c->name.c_str());
+ if (sendnotice)
+ c->WriteNotice(InspIRCd::Format("User %s is KNOCKing on %s (%s)", user->nick.c_str(), c->name.c_str(), parameters[1].c_str()));
+
+ if (sendnumeric)
+ {
+ Numeric::Numeric numeric(710);
+ numeric.push(c->name).push(user->GetFullHost()).push("is KNOCKing: " + parameters[1]);
+
+ ClientProtocol::Messages::Numeric numericmsg(numeric, c->name);
+ c->Write(ServerInstance->GetRFCEvents().numeric, numericmsg);
+ }
+
+ user->WriteNotice("KNOCKing on " + c->name);