]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/snomasks.cpp
Merge pull request #514 from SaberUK/master+virtual-cleanup
[user/henk/code/inspircd.git] / src / snomasks.cpp
index c35c19d4eb680013ccf737259c247acc1ded0b4c..f018a0d1a0dcfcae15f65c159d14464e9add36e3 100644 (file)
@@ -100,11 +100,11 @@ void Snomask::SendMessage(const std::string &message, char mysnomask)
 
                std::string desc = Description;
                if (desc.empty())
-                       desc = "SNO-" + tolower(mysnomask);
+                       desc = std::string("SNO-") + (char)tolower(mysnomask);
                if (isupper(mysnomask))
                        desc = "REMOTE" + desc;
                ModResult MOD_RESULT;
-               ServerInstance->Logs->Log("snomask", DEFAULT, "%s: %s", desc.c_str(), message.c_str());
+               ServerInstance->Logs->Log("snomask", LOG_DEFAULT, "%s: %s", desc.c_str(), message.c_str());
 
                FIRST_MOD_RESULT(OnSendSnotice, MOD_RESULT, (mysnomask, desc, message));
 
@@ -120,7 +120,7 @@ void Snomask::SendMessage(const std::string &message, char mysnomask)
                                User* a = *i;
                                if (IS_LOCAL(a) && a->IsModeSet('s') && a->IsNoticeMaskSet(mysnomask) && !a->quitting)
                                {
-                                       a->WriteServ("NOTICE %s :*** %s: %s", a->nick.c_str(), desc.c_str(), message.c_str());
+                                       a->WriteNotice("*** " + desc + ": " + message);
                                }
 
                                i++;
@@ -136,12 +136,12 @@ void Snomask::Flush()
        {
                std::string desc = Description;
                if (desc.empty())
-                       desc = "SNO-" + tolower(LastLetter);
+                       desc = std::string("SNO-") + (char)tolower(LastLetter);
                if (isupper(LastLetter))
                        desc = "REMOTE" + desc;
                std::string mesg = "(last message repeated "+ConvToStr(Count)+" times)";
 
-               ServerInstance->Logs->Log("snomask", DEFAULT, "%s: %s", desc.c_str(), mesg.c_str());
+               ServerInstance->Logs->Log("snomask", LOG_DEFAULT, "%s: %s", desc.c_str(), mesg.c_str());
 
                FOREACH_MOD(I_OnSendSnotice, OnSendSnotice(LastLetter, desc, mesg));
 
@@ -155,7 +155,7 @@ void Snomask::Flush()
                                User* a = *i;
                                if (IS_LOCAL(a) && a->IsModeSet('s') && a->IsNoticeMaskSet(LastLetter) && !a->quitting)
                                {
-                                       a->WriteServ("NOTICE %s :*** %s: %s", a->nick.c_str(), desc.c_str(), mesg.c_str());
+                                       a->WriteNotice("*** " + desc + ": " + mesg);
                                }
 
                                i++;
@@ -163,7 +163,7 @@ void Snomask::Flush()
                }
 
        }
-       LastMessage = "";
+       LastMessage.clear();
        LastBlocked = false;
        Count = 0;
 }