From 97c7c3ff2a483e42f4e4ef900fc9ea493d498ebb Mon Sep 17 00:00:00 2001 From: danieldg Date: Sat, 18 Apr 2009 19:51:24 +0000 Subject: Add global-routing snomask functions git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11314 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/snomasks.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/snomasks.cpp') diff --git a/src/snomasks.cpp b/src/snomasks.cpp index 2e682675d..e12f95d6b 100644 --- a/src/snomasks.cpp +++ b/src/snomasks.cpp @@ -73,6 +73,13 @@ void SnomaskManager::WriteToSnoMask(char letter, const std::string &text) } } +void SnomaskManager::WriteGlobalSno(char letter, const std::string& text) +{ + WriteToSnoMask(letter, text); + letter = toupper(letter); + ServerInstance->PI->SendSNONotice(std::string(1, letter), text); +} + void SnomaskManager::WriteToSnoMask(char letter, const char* text, ...) { char textbuffer[MAXBUF]; @@ -85,6 +92,18 @@ void SnomaskManager::WriteToSnoMask(char letter, const char* text, ...) this->WriteToSnoMask(letter, std::string(textbuffer)); } +void SnomaskManager::WriteGlobalSno(char letter, const char* text, ...) +{ + char textbuffer[MAXBUF]; + va_list argsPtr; + + va_start(argsPtr, text); + vsnprintf(textbuffer, MAXBUF, text, argsPtr); + va_end(argsPtr); + + this->WriteGlobalSno(letter, std::string(textbuffer)); +} + bool SnomaskManager::IsEnabled(char letter) { return (SnoMasks.find(letter) != SnoMasks.end()); -- cgit v1.2.3