+
+ }
+
+ virtual ModResult OnSendSnotice(char &sno, std::string &desc, const std::string &msg)
+ {
+ std::pair<ChanLogTargets::const_iterator, ChanLogTargets::const_iterator> itpair = logstreams.equal_range(sno);
+ if (itpair.first == itpair.second)
+ return MOD_RES_PASSTHRU;
+
+ char buf[MAXBUF];
+ snprintf(buf, MAXBUF, "\2%s\2: %s", desc.c_str(), msg.c_str());
+
+ for (ChanLogTargets::const_iterator it = itpair.first; it != itpair.second; ++it)
+ {
+ Channel *c = ServerInstance->FindChan(it->second);
+ if (c)
+ {
+ c->WriteChannelWithServ(ServerInstance->Config->ServerName, "PRIVMSG %s :%s", c->name.c_str(), buf);
+ ServerInstance->PI->SendChannelPrivmsg(c, 0, buf);
+ }
+ }
+
+ return MOD_RES_PASSTHRU;
+ }
+
+ virtual Version GetVersion()
+ {
+ return Version("Logs snomask output to channel(s).", VF_VENDOR);