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