using namespace std;
-#include <stdio.h>
#include "users.h"
#include "channels.h"
#include "modules.h"
-
#include "inspircd.h"
/* $ModDesc: Provides support for oper-only chans via the +O channel mode */
-
-
class OperChans : public ModeHandler
{
public:
void Implements(char* List)
{
- List[I_On005Numeric] = List[I_OnUserPreJoin] = 1;
- }
-
- virtual void On005Numeric(std::string &output)
- {
+ List[I_OnUserPreJoin] = 1;
}
-
+
virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname)
{
if (!*user->oper)
virtual ~ModuleOperChans()
{
+ ServerInstance->Modes->DelMode(oc);
DELETE(oc);
}
virtual Version GetVersion()
{
- return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
+ return Version(1,0,0,0,VF_VENDOR|VF_COMMON);
}
};