X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_shun.cpp;h=cbaa6840991d3dda1163352cf94de001b0987c7b;hb=551d687ec6d7ce44be35fae0dd7345fe73c4f63a;hp=c858e62ec30ebb4dbf3ed5b536c56789f8f27ddb;hpb=66b90807bb94d88c8a34ec8a1fd7c1558941c47a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp index c858e62ec..cbaa68409 100644 --- a/src/modules/m_shun.cpp +++ b/src/modules/m_shun.cpp @@ -36,10 +36,6 @@ public: this->matchtext = shunmask; } - ~Shun() - { - } - bool Matches(User *u) { // E: overrides shun @@ -60,12 +56,6 @@ public: return false; } - void DisplayExpiry() - { - ServerInstance->SNO->WriteToSnoMask('x',"Removing expired shun %s (set by %s %ld seconds ago)", - this->matchtext.c_str(), this->source.c_str(), (long int)(ServerInstance->Time() - this->set_time)); - } - const char* Displayable() { return matchtext.c_str(); @@ -128,11 +118,11 @@ class CommandShun : public Command else { // Adding - XXX todo make this respect tag perhaps.. - long duration; + unsigned long duration; std::string expr; if (parameters.size() > 2) { - duration = ServerInstance->Duration(parameters[1]); + duration = InspIRCd::Duration(parameters[1]); expr = parameters[2]; } else @@ -254,7 +244,7 @@ class ModuleShun : public Module return MOD_RES_PASSTHRU; } - if (!affectopers && IS_OPER(user)) + if (!affectopers && user->IsOper()) { /* Don't do anything if the user is an operator and affectopers isn't set */ return MOD_RES_PASSTHRU; @@ -291,4 +281,3 @@ class ModuleShun : public Module }; MODULE_INIT(ModuleShun) -