* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * Inspire is copyright (C) 2002-2004 ChatSpike-Dev.
+ * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
* E-mail:
* <brain@chatspike.net>
* <Craig@chatspike.net>
* ---------------------------------------------------
*/
-using namespace std;
-
-#include <stdio.h>
#include "users.h"
#include "channels.h"
#include "modules.h"
ConfigReader *Conf;
public:
- ModuleDenyChannels(Server* Me)
- : Module::Module(Me)
+ ModuleDenyChannels(Server* Me) : Module::Module(Me)
{
Srv = Me;
Conf = new ConfigReader;
}
+ virtual void OnRehash(std::string param)
+ {
+ delete Conf;
+ Conf = new ConfigReader;
+ }
+
virtual ~ModuleDenyChannels()
{
delete Conf;
return Version(1,0,0,1,VF_VENDOR);
}
+ void Implements(char* List)
+ {
+ List[I_OnUserPreJoin] = List[I_OnRehash] = 1;
+ }
+
virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname)
{
for (int j =0; j < Conf->Enumerate("badchan"); j++)
irc::string thischan = cname;
if (thischan == cn)
{
- if ((Conf->ReadFlag("badchan","allowopers",j)) && (strchr(user->modes,'o')))
+ if ((Conf->ReadFlag("badchan","allowopers",j)) && *user->oper)
{
return 0;
}