diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp index 916cb8d02..7c0f09e63 100644 --- a/modules/commands/cs_mode.cpp +++ b/modules/commands/cs_mode.cpp @@ -88,6 +88,7 @@ class CommandCSMode : public Command if (!mode_param.empty()) mode_param = " " + mode_param; source.Reply(_("%c%c%s locked on %s"), adding ? '+' : '-', cm->ModeChar, mode_param.c_str(), ci->name.c_str()); + Log(LOG_COMMAND, u, this, ci) << "to lock " << (adding ? '+' : '-') << cm->ModeChar << mode_param; } } } @@ -117,11 +118,17 @@ class CommandCSMode : public Command if (adding == -1) break; ChannelMode *cm = ModeManager::FindChannelModeByChar(modes[i]); - if (!cm || !cm->CanSet(u)) + if (!cm) { source.Reply(_("Unknown mode character %c ignored."), modes[i]); break; } + else if (!cm->CanSet(u)) + { + source.Reply(_("You may not (un)lock mode %c."), modes[i]); + break; + } + Anope::string mode_param; if (!cm->Type == MODE_REGULAR && !sep.GetToken(mode_param)) source.Reply(_("Missing parameter for mode %c."), cm->ModeChar); @@ -132,6 +139,7 @@ class CommandCSMode : public Command if (!mode_param.empty()) mode_param = " " + mode_param; source.Reply(_("%c%c%s has been unlocked from %s."), adding == 1 ? '+' : '-', cm->ModeChar, mode_param.c_str(), ci->name.c_str()); + Log(LOG_COMMAND, u, this, ci) << "to unlock " << (adding ? '+' : '-') << cm->ModeChar << mode_param; } else source.Reply(_("%c is not locked on %s."), cm->ModeChar, ci->name.c_str()); diff --git a/modules/commands/os_session.cpp b/modules/commands/os_session.cpp index edaf841d5..752fe8729 100644 --- a/modules/commands/os_session.cpp +++ b/modules/commands/os_session.cpp @@ -258,7 +258,7 @@ class CommandOSSession : public Command else { Exception *exception = session_service->FindException(param); - source.Reply(_("The host \002%s\002 currently has \002%d\002 sessions with a limit of \002%d\002."), param.c_str(), session->count, exception ? exception-> limit : Config->DefSessionLimit); + source.Reply(_("The host \002%s\002 currently has \002%d\002 sessions with a limit of \002%d\002."), param.c_str(), session->count, exception && exception->limit > Config->DefSessionLimit ? exception->limit : Config->DefSessionLimit); } return; diff --git a/src/memoserv.cpp b/src/memoserv.cpp index faaca180b..602db9897 100644 --- a/src/memoserv.cpp +++ b/src/memoserv.cpp @@ -20,9 +20,10 @@ SerializableBase::serialized_data Memo::serialize() serialized_data data; data["owner"] << this->owner; - data["time"] << this->time; + data["time"].setType(Serialize::DT_INT) << this->time; data["sender"] << this->sender; data["text"] << this->text; + data["flags"] << this->ToString(); return data; } @@ -42,6 +43,7 @@ void Memo::unserialize(SerializableBase::serialized_data &data) data["time"] >> m->time; data["sender"] >> m->sender; data["text"] >> m->text; + m->FromString(data["flags"].astr()); mi->memos.push_back(m); } diff --git a/src/misc.cpp b/src/misc.cpp index 9354201b2..5e899effd 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -276,7 +276,7 @@ Anope::string expire_left(NickCore *nc, time_t expires) if (!expires) return translate(nc, NO_EXPIRE); else if (expires <= Anope::CurTime) - return translate(nc, _("expires at next database update")); + return translate(nc, _("expires momentarily")); else { char buf[256];