]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_services_account.cpp
Add const std::string &original_command to OnPreCommand and OnPostCommand, which...
[user/henk/code/inspircd.git] / src / modules / m_services_account.cpp
index 97233a7d3f61c72cff6a7a72f29a94392e060164..739ad611972370045a242fe012f708fcba8dba0a 100644 (file)
@@ -24,6 +24,8 @@ using namespace std;
 
 /* $ModDesc: Povides support for ircu-style services accounts, including chmode +R, etc. */
 
+/** Channel mode +R - unidentified users cannot join
+ */
 class AChannel_R : public ModeHandler
 {
  public:
@@ -52,6 +54,8 @@ class AChannel_R : public ModeHandler
        }
 };
 
+/** User mode +R - unidentified users cannot message
+ */
 class AUser_R : public ModeHandler
 {
  public:
@@ -80,6 +84,8 @@ class AUser_R : public ModeHandler
        }
 };
 
+/** Channel mode +M - unidentified users cannot message channel
+ */
 class AChannel_M : public ModeHandler
 {
  public:
@@ -99,7 +105,7 @@ class AChannel_M : public ModeHandler
                {
                        if (channel->IsModeSet('M'))
                        {
-                               channel->SetMode('M',true);
+                               channel->SetMode('M',false);
                                return MODEACTION_ALLOW;
                        }
                }
@@ -305,6 +311,9 @@ class ModuleServicesAccount : public Module
 
        virtual ~ModuleServicesAccount()
        {
+               ServerInstance->Modes->DelMode(m1);
+               ServerInstance->Modes->DelMode(m2);
+               ServerInstance->Modes->DelMode(m3);
                DELETE(m1);
                DELETE(m2);
                DELETE(m3);
@@ -312,7 +321,7 @@ class ModuleServicesAccount : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
+               return Version(1,0,0,0,VF_COMMON|VF_VENDOR);
        }
 };