X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcoremods%2Fcore_message.cpp;h=b4404995df2de07a48ac4c98850e7a73da544c71;hb=79650e86fd52979a671df40c33843f77b33ab3a4;hp=648172b576e0febbc9d6008731072c51119be160;hpb=aa692dc1039b63deef7886e914ec499abe7facaf;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/coremods/core_message.cpp b/src/coremods/core_message.cpp index 648172b57..b4404995d 100644 --- a/src/coremods/core_message.cpp +++ b/src/coremods/core_message.cpp @@ -128,7 +128,7 @@ namespace { // If the source is local and was not sending a CTCP reply then update their idle time. LocalUser* lsource = IS_LOCAL(source); - if (lsource && (msgdetails.type != MSG_NOTICE || !msgdetails.IsCTCP())) + if (lsource && msgdetails.update_idle && (msgdetails.type != MSG_NOTICE || !msgdetails.IsCTCP())) lsource->idle_lastmsg = ServerInstance->Time(); // Inform modules that a message was sent. @@ -408,7 +408,7 @@ class ModuleCoreMessage : public Module if (chan->IsModeSet(noextmsgmode) && !chan->HasUser(user)) { // The noextmsg mode is set and the user is not in the channel. - user->WriteNumeric(ERR_CANNOTSENDTOCHAN, chan->name, "Cannot send to channel (no external messages)"); + user->WriteNumeric(Numerics::CannotSendTo(chan, "external messages", *noextmsgmode)); return MOD_RES_DENY; } @@ -416,7 +416,7 @@ class ModuleCoreMessage : public Module if (no_chan_priv && chan->IsModeSet(moderatedmode)) { // The moderated mode is set and the user has no status rank. - user->WriteNumeric(ERR_CANNOTSENDTOCHAN, chan->name, "Cannot send to channel (+m is set)"); + user->WriteNumeric(Numerics::CannotSendTo(chan, "messages", *moderatedmode)); return MOD_RES_DENY; } @@ -424,7 +424,7 @@ class ModuleCoreMessage : public Module { // The user is banned in the channel and restrictbannedusers is enabled. if (ServerInstance->Config->RestrictBannedUsers == ServerConfig::BUT_RESTRICT_NOTIFY) - user->WriteNumeric(ERR_CANNOTSENDTOCHAN, chan->name, "Cannot send to channel (you're banned)"); + user->WriteNumeric(Numerics::CannotSendTo(chan, "You cannot send messages to this channel whilst banned.")); return MOD_RES_DENY; }