- virtual Version GetVersion()
- {
- return Version(1,0,0,1,VF_VENDOR);
- }
-
- virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated)
+ ModuleAlias(InspIRCd* Me)
+ : Module::Module(Me)
+ {
+
+ MyConf = new ConfigReader(ServerInstance);
+ ReadAliases();
+ }
+
+ void Implements(char* List)
+ {
+ List[I_OnPreCommand] = List[I_OnRehash] = 1;
+ }
+
+ virtual ~ModuleAlias()
+ {
+ DELETE(MyConf);
+ }
+
+ virtual Version GetVersion()
+ {
+ return Version(1,0,0,1,VF_VENDOR);
+ }
+
+ virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated)
+ {
+ userrec *u = NULL;
+ irc::string c = command.c_str();
+ /* If the command is valid, we dont want to know,
+ * and if theyre not registered yet, we dont want
+ * to know either
+ */
+ if ((validated) || (user->registered != REG_ALL))
+ return 0;
+
+ for (unsigned int i = 0; i < Aliases.size(); i++)