]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules.cpp
Annotations
[user/henk/code/inspircd.git] / src / modules.cpp
index c6bacaa54f31fd20cdd9ee025defb2a632960690..f5e83c0930eee8d28353f3ffae25e7c773fb1c03 100644 (file)
  * ---------------------------------------------------
  */
 
-#include "inspircd_config.h"
-//#include "inspircd.h"
 #include "configreader.h"
-#include <unistd.h>
-#include <sys/errno.h>
-#include <time.h>
-#include <string>
-#include <map>
-#include <sstream>
-#include <vector>
-#include <deque>
 #include "users.h"
-#include "ctables.h"
-#include "globals.h"
 #include "modules.h"
-#include "dynamic.h"
 #include "wildcard.h"
 #include "mode.h"
 #include "xline.h"
-#include "commands.h"
-#include "inspstring.h"
-
-#include "hashcomp.h"
 #include "socket.h"
 #include "socketengine.h"
-#include "typedefs.h"
-#include "modules.h"
 #include "command_parse.h"
 #include "dns.h"
 #include "inspircd.h"
 
 // version is a simple class for holding a modules version number
-
 Version::Version(int major, int minor, int revision, int build, int flags)
 : Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags)
 {
@@ -152,6 +132,7 @@ void                Module::OnLoadModule(Module* mod,const std::string &name) { };
 void           Module::OnUnloadModule(Module* mod,const std::string &name) { };
 void           Module::OnBackgroundTimer(time_t curtime) { };
 int            Module::OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated) { return 0; };
+void           Module::OnPostCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, CmdResult result) { };
 bool           Module::OnCheckReady(userrec* user) { return true; };
 void           Module::OnUserRegister(userrec* user) { };
 int            Module::OnUserPreKick(userrec* source, userrec* user, chanrec* chan, const std::string &reason) { return 0; };
@@ -209,25 +190,8 @@ void               Module::OnChannelDelete(chanrec* chan) { };
 Priority       Module::Prioritize() { return PRIORITY_DONTCARE; }
 void           Module::OnSetAway(userrec* user) { };
 void           Module::OnCancelAway(userrec* user) { };
+int            Module::OnUserList(userrec* user, chanrec* Ptr) { return 0; };
 
-/* server is a wrapper class that provides methods to all of the C-style
- * exports in the core
- */
-
-void InspIRCd::AddSocket(InspSocket* sock)
-{
-       this->module_sockets.push_back(sock);
-}
-
-void InspIRCd::RemoveSocket(InspSocket* sock)
-{
-       for (std::vector<InspSocket*>::iterator a = this->module_sockets.begin(); a < this->module_sockets.end(); a++)
-       {
-               InspSocket* s = (InspSocket*)*a;
-               if (s == sock)
-                       s->MarkAsClosed();
-       }
-}
 
 long InspIRCd::PriorityAfter(const std::string &modulename)
 {
@@ -303,18 +267,6 @@ void InspIRCd::RehashServer()
        this->Config->Read(false,NULL);
 }
 
-void InspIRCd::DelSocket(InspSocket* sock)
-{
-       for (std::vector<InspSocket*>::iterator a = this->module_sockets.begin(); a < this->module_sockets.end(); a++)
-       {
-               if (*a == sock)
-               {
-                       this->module_sockets.erase(a);
-                       return;
-               }
-       }
-}
-
 /* This is ugly, yes, but hash_map's arent designed to be
  * addressed in this manner, and this is a bit of a kludge.
  * Luckily its a specialist function and rarely used by