]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_gecosban.cpp
Increase the size of the matrix for map drawing to 250x250
[user/henk/code/inspircd.git] / src / modules / m_gecosban.cpp
index 614320623e25bfaf2d06eb8e3f088076dfc3242f..c7194aef56ba06c56987d05b5443237646ba0c09 100644 (file)
@@ -44,8 +44,7 @@ class ModuleGecosBan : public Module
 
                if (c->IsExtBanned(user->fullname, 'r'))
                {
-                       // XXX: send a numeric here
-                       user->WriteServ("NOTICE "+std::string(user->nick)+" :*** Cannot join " + c->name + ", as you match a ban");
+                       user->WriteNumeric(ERR_BANNEDFROMCHAN, "%s %s :Cannot join channel (You're banned)", user->nick.c_str(),  c->name.c_str());
                        return 1;
                }
 
@@ -54,10 +53,7 @@ class ModuleGecosBan : public Module
 
        virtual void On005Numeric(std::string &output)
        {
-               if (output.find(" EXTBAN=:") == std::string::npos)
-                       output.append(" EXTBAN=:r");
-               else
-                       output.insert(output.find(" EXTBAN=:") + 9, "r");
+               ServerInstance->AddExtBanChar('r');
        }
 };