summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/memoserv/read.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/memoserv/read.cpp b/modules/memoserv/read.cpp
index 846e90fea..62d6cd4d2 100644
--- a/modules/memoserv/read.cpp
+++ b/modules/memoserv/read.cpp
@@ -121,7 +121,7 @@ class CommandMSRead : public Command
else
mi = source.nc->GetMemos();
- if (numstr.empty() || (!numstr.equals_ci("LAST") && !numstr.equals_ci("NEW") && !numstr.is_number_only()))
+ if (numstr.empty() || (!numstr.equals_ci("LAST") && !numstr.equals_ci("NEW") && numstr.find_first_not_of("0123456789.,-") != Anope::string::npos))
{
this->OnSyntaxError(source, numstr);
return;
@@ -167,15 +167,21 @@ class CommandMSRead : public Command
}
else /* number[s] */
{
+ bool shown = false;
+
NumberList(numstr, false,
[&](unsigned int number)
{
if (!number || number > memos.size())
return;
+ shown = true;
DoRead(source, mi, ci, number - 1);
},
[]{});
+
+ if (!shown)
+ source.Reply(_("No memos to display."));
}
}