summaryrefslogtreecommitdiff
path: root/src/modules/m_chghost.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_chghost.cpp')
-rw-r--r--src/modules/m_chghost.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp
index 9d60d929c..0dd250f18 100644
--- a/src/modules/m_chghost.cpp
+++ b/src/modules/m_chghost.cpp
@@ -37,6 +37,11 @@ class cmd_chghost : public command_t
void Handle(char **parameters, int pcnt, userrec *user)
{
+ if (strlen(parameters[1]) > 64)
+ {
+ WriteServ(user->fd,"NOTICE %s :*** CHGHOST: Host too long",user->nick);
+ return;
+ }
for (unsigned int x = 0; x < strlen(parameters[1]); x++)
{
if (((tolower(parameters[1][x]) < 'a') || (tolower(parameters[1][x]) > 'z')) && (parameters[1][x] != '.'))