summaryrefslogtreecommitdiff
path: root/modules/commands/cs_kick.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands/cs_kick.cpp')
-rw-r--r--modules/commands/cs_kick.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/commands/cs_kick.cpp b/modules/commands/cs_kick.cpp
index d7251ec6b..f1a632af3 100644
--- a/modules/commands/cs_kick.cpp
+++ b/modules/commands/cs_kick.cpp
@@ -13,6 +13,8 @@
#include "module.h"
+static ServiceReference<ChanServService> chanserv("ChanServService", "ChanServ");
+
class CommandCSKick : public Command
{
public:
@@ -45,8 +47,9 @@ class CommandCSKick : public Command
return;
}
- if (reason.length() > Config->CSReasonMax)
- reason = reason.substr(0, Config->CSReasonMax);
+ unsigned reasonmax = Config->GetModule("chanserv")->Get<unsigned>("reasonmax", "200");
+ if (reason.length() > reasonmax)
+ reason = reason.substr(0, reasonmax);
AccessGroup u_access = source.AccessFor(ci);