]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_abbreviation.cpp
Always deny invite to users below halfop status, move OnUserPreInvite up to above...
[user/henk/code/inspircd.git] / src / modules / m_abbreviation.cpp
index dbda047b5a557b24c42a7de33409680866de530f..dc298d726f85be3a2cb0d94b781f6162e41b21c8 100644 (file)
@@ -19,7 +19,7 @@ class ModuleAbbreviation : public Module
 {
 
  public:
-       
+
        ModuleAbbreviation(InspIRCd* Me)
                : Module(Me)
        {
@@ -53,6 +53,12 @@ class ModuleAbbreviation : public Module
 
                        if (command == n->first.substr(0, clen))
                        {
+                               if (matchlist.length() > 450)
+                               {
+                                       user->WriteNumeric(420, "%s :Ambiguous abbreviation and too many possible matches.", user->nick.c_str());
+                                       return true;
+                               }
+
                                if (!foundmatch)
                                {
                                        /* Found the command */