X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fhelperfuncs.cpp;h=0ec8db966601540fe60e04324e8a958c8b65eef1;hb=40dc59986b3991d3db3cb3a761aa9aa7bab69737;hp=50a3af61f4a542d0141b71e0015b1c5ba2aa9cec;hpb=b6dbd6caab62bc2c0d11ce5a45d511611eb9c2ef;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 50a3af61f..0ec8db966 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -150,11 +150,11 @@ long InspIRCd::ChannelCount() bool InspIRCd::IsValidMask(const std::string &mask) { - char* dest = (char*)mask.c_str(); + const char* dest = mask.c_str(); int exclamation = 0; int atsign = 0; - for (char* i = dest; *i; i++) + for (const char* i = dest; *i; i++) { /* out of range character, bad mask */ if (*i < 32 || *i > 126) @@ -340,22 +340,12 @@ void InspIRCd::CheckRoot() } } -void InspIRCd::CheckDie() -{ - if (*Config->DieValue) - { - printf("WARNING: %s\n\n",Config->DieValue); - this->Logs->Log("CONFIG",DEFAULT,"Died because of tag: %s",Config->DieValue); - Exit(EXIT_STATUS_DIETAG); - } -} - void InspIRCd::SendWhoisLine(User* user, User* dest, int numeric, const std::string &text) { std::string copy_text = text; - int MOD_RESULT = 0; - FOREACH_RESULT_I(this, I_OnWhoisLine, OnWhoisLine(user, dest, numeric, copy_text)); + ModResult MOD_RESULT; + FIRST_MOD_RESULT(this, OnWhoisLine, MOD_RESULT, (user, dest, numeric, copy_text)); if (!MOD_RESULT) user->WriteServ("%d %s", numeric, copy_text.c_str());