diff options
author | linuxdaemon <linuxdaemon@users.noreply.github.com> | 2018-12-21 12:37:22 -0600 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-12-21 19:37:22 +0100 |
commit | 7530285740c2db1bc4457859b0d5f2436e0ed113 (patch) | |
tree | 89635613725a1b7ad6e262d7e3035a518d42e8d2 /src/modules/m_rline.cpp | |
parent | 60ae49b62a371791ebbd9e4b131e33b857873f06 (diff) |
Only parse valid durations, don't treat invalid multipliers as seconds (#1538)
Diffstat (limited to 'src/modules/m_rline.cpp')
-rw-r--r-- | src/modules/m_rline.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modules/m_rline.cpp b/src/modules/m_rline.cpp index c1eeb7b9a..77b3bc3aa 100644 --- a/src/modules/m_rline.cpp +++ b/src/modules/m_rline.cpp @@ -147,7 +147,12 @@ class CommandRLine : public Command { // Adding - XXX todo make this respect <insane> tag perhaps.. - unsigned long duration = InspIRCd::Duration(parameters[1]); + unsigned long duration; + if (!InspIRCd::Duration(parameters[1], duration)) + { + user->WriteNotice("*** Invalid duration for R-line"); + return CMD_FAILURE; + } XLine *r = NULL; try |