From 877a15fc3db18be9131c886720516eae6f582886 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 1 May 2004 16:54:50 +0000 Subject: Added extra docs to cover OnUserSync etc git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@769 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/module-doc/modules_8h-source.html | 398 +++++++++++++++++---------------- 1 file changed, 203 insertions(+), 195 deletions(-) (limited to 'docs/module-doc/modules_8h-source.html') diff --git a/docs/module-doc/modules_8h-source.html b/docs/module-doc/modules_8h-source.html index 687d9919d..6868c47b5 100644 --- a/docs/module-doc/modules_8h-source.html +++ b/docs/module-doc/modules_8h-source.html @@ -56,205 +56,213 @@ 00050 typedef std::deque<std::string> file_cache; 00051 typedef file_cache string_list; 00052 -00053 -00054 // This #define allows us to call a method in all -00055 // loaded modules in a readable simple way, e.g.: -00056 // 'FOREACH_MOD OnConnect(user);' +00055 typedef std::deque<userrec*> chanuserlist; +00056 00057 -00058 #define FOREACH_MOD for (int i = 0; i <= MODCOUNT; i++) modules[i]-> -00059 -00060 // This define is similar to the one above but returns a result in MOD_RESULT. -00061 // The first module to return a nonzero result is the value to be accepted, -00062 // and any modules after are ignored. -00063 -00064 // ********************************************************************************************* -00065 -00066 #define FOREACH_RESULT(x) { MOD_RESULT = 0; \ -00067 for (int i = 0; i <= MODCOUNT; i++) { \ -00068 int res = modules[i]->x ; \ -00069 if (res) { \ -00070 MOD_RESULT = res; \ -00071 break; \ -00072 } \ -00073 } \ -00074 } -00075 -00076 // ********************************************************************************************* -00077 -00078 extern void createcommand(char* cmd, handlerfunc f, char flags, int minparams); -00079 extern void server_mode(char **parameters, int pcnt, userrec *user); -00080 -00081 // class Version holds the version information of a Module, returned -00082 // by Module::GetVersion (thanks RD) -00083 -00088 class Version : public classbase -00089 { -00090 public: -00091 const int Major, Minor, Revision, Build; -00092 Version(int major, int minor, int revision, int build); -00093 }; -00094 -00100 class Admin : public classbase -00101 { -00102 public: -00103 const std::string Name, Email, Nick; -00104 Admin(std::string name, std::string email, std::string nick); -00105 }; -00106 -00112 class Module : public classbase -00113 { -00114 public: -00115 -00119 Module(); -00120 -00124 virtual ~Module(); -00125 -00130 virtual Version GetVersion(); -00131 -00135 virtual void OnUserConnect(userrec* user); -00136 -00140 virtual void OnUserQuit(userrec* user); -00141 -00146 virtual void OnUserJoin(userrec* user, chanrec* channel); -00147 -00152 virtual void OnUserPart(userrec* user, chanrec* channel); -00153 -00160 virtual void OnPacketTransmit(char *p); -00161 -00169 virtual void OnPacketReceive(char *p); -00170 -00176 virtual void OnRehash(); -00177 -00186 virtual void OnServerRaw(std::string &raw, bool inbound, userrec* user); -00187 -00197 virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params); -00198 -00211 virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname); -00212 -00213 -00218 virtual void OnOper(userrec* user); -00219 -00228 virtual void OnInfo(userrec* user); -00229 -00234 virtual void OnWhois(userrec* source, userrec* dest); -00235 -00244 virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string text); -00245 -00254 virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string text); -00255 -00263 virtual int OnUserPreNick(userrec* user, std::string newnick); -00264 -00286 virtual int OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type); -00287 }; -00288 -00289 -00295 class Server : public classbase -00296 { -00297 public: -00301 Server(); -00305 virtual ~Server(); +00058 // This #define allows us to call a method in all +00059 // loaded modules in a readable simple way, e.g.: +00060 // 'FOREACH_MOD OnConnect(user);' +00061 +00062 #define FOREACH_MOD for (int i = 0; i <= MODCOUNT; i++) modules[i]-> +00063 +00064 // This define is similar to the one above but returns a result in MOD_RESULT. +00065 // The first module to return a nonzero result is the value to be accepted, +00066 // and any modules after are ignored. +00067 +00068 // ********************************************************************************************* +00069 +00070 #define FOREACH_RESULT(x) { MOD_RESULT = 0; \ +00071 for (int i = 0; i <= MODCOUNT; i++) { \ +00072 int res = modules[i]->x ; \ +00073 if (res) { \ +00074 MOD_RESULT = res; \ +00075 break; \ +00076 } \ +00077 } \ +00078 } +00079 +00080 // ********************************************************************************************* +00081 +00082 extern void createcommand(char* cmd, handlerfunc f, char flags, int minparams); +00083 extern void server_mode(char **parameters, int pcnt, userrec *user); +00084 +00085 // class Version holds the version information of a Module, returned +00086 // by Module::GetVersion (thanks RD) +00087 +00092 class Version : public classbase +00093 { +00094 public: +00095 const int Major, Minor, Revision, Build; +00096 Version(int major, int minor, int revision, int build); +00097 }; +00098 +00104 class Admin : public classbase +00105 { +00106 public: +00107 const std::string Name, Email, Nick; +00108 Admin(std::string name, std::string email, std::string nick); +00109 }; +00110 +00116 class Module : public classbase +00117 { +00118 public: +00119 +00123 Module(); +00124 +00128 virtual ~Module(); +00129 +00134 virtual Version GetVersion(); +00135 +00139 virtual void OnUserConnect(userrec* user); +00140 +00144 virtual void OnUserQuit(userrec* user); +00145 +00150 virtual void OnUserJoin(userrec* user, chanrec* channel); +00151 +00156 virtual void OnUserPart(userrec* user, chanrec* channel); +00157 +00164 virtual void OnPacketTransmit(char *p); +00165 +00173 virtual void OnPacketReceive(char *p); +00174 +00180 virtual void OnRehash(); +00181 +00190 virtual void OnServerRaw(std::string &raw, bool inbound, userrec* user); +00191 +00201 virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params); +00202 +00215 virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname); +00216 +00217 +00222 virtual void OnOper(userrec* user); +00223 +00232 virtual void OnInfo(userrec* user); +00233 +00238 virtual void OnWhois(userrec* source, userrec* dest); +00239 +00248 virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string text); +00249 +00258 virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string text); +00259 +00267 virtual int OnUserPreNick(userrec* user, std::string newnick); +00268 +00291 virtual int OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type); +00297 virtual string_list OnUserSync(userrec* user); +00298 +00304 virtual string_list OnChannelSync(chanrec* chan); +00305 }; 00306 -00310 virtual void SendOpers(std::string s); -00315 virtual void Log(int level, std::string s); -00320 virtual void Send(int Socket, std::string s); -00325 virtual void SendServ(int Socket, std::string s); -00330 virtual void SendFrom(int Socket, userrec* User, std::string s); -00345 virtual void SendTo(userrec* Source, userrec* Dest, std::string s); -00352 virtual void SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender); -00357 virtual bool CommonChannels(userrec* u1, userrec* u2); -00365 virtual void SendCommon(userrec* User, std::string text,bool IncludeSender); -00370 virtual void SendWallops(userrec* User, std::string text); -00371 -00375 virtual bool IsNick(std::string nick); -00379 virtual int CountUsers(chanrec* c); -00383 virtual userrec* FindNick(std::string nick); -00387 virtual chanrec* FindChannel(std::string channel); -00392 virtual std::string ChanMode(userrec* User, chanrec* Chan); -00396 virtual bool IsOnChannel(userrec* User, chanrec* Chan); -00399 virtual std::string GetServerName(); -00402 virtual std::string GetNetworkName(); -00408 virtual Admin GetAdmin(); -00427 virtual bool AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off); -00428 -00450 virtual bool AddExtendedListMode(char modechar); -00451 -00466 virtual void AddCommand(char* cmd, handlerfunc f, char flags, int minparams); -00467 -00489 virtual void SendMode(char **parameters, int pcnt, userrec *user); -00490 -00503 virtual void SendToModeMask(std::string modes, int flags, std::string text); -00504 -00510 virtual chanrec* JoinUserToChannel(userrec* user, std::string cname, std::string key); -00511 -00517 virtual chanrec* PartUserFromChannel(userrec* user, std::string cname, std::string reason); -00518 -00524 virtual void ChangeUserNick(userrec* user, std::string nickname); -00525 -00536 virtual void QuitUser(userrec* user, std::string reason); -00537 -00542 virtual bool MatchText(std::string sliteral, std::string spattern); +00307 +00313 class Server : public classbase +00314 { +00315 public: +00319 Server(); +00323 virtual ~Server(); +00324 +00328 virtual void SendOpers(std::string s); +00333 virtual void Log(int level, std::string s); +00338 virtual void Send(int Socket, std::string s); +00343 virtual void SendServ(int Socket, std::string s); +00348 virtual void SendFrom(int Socket, userrec* User, std::string s); +00363 virtual void SendTo(userrec* Source, userrec* Dest, std::string s); +00370 virtual void SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender); +00375 virtual bool CommonChannels(userrec* u1, userrec* u2); +00383 virtual void SendCommon(userrec* User, std::string text,bool IncludeSender); +00388 virtual void SendWallops(userrec* User, std::string text); +00389 +00393 virtual bool IsNick(std::string nick); +00397 virtual int CountUsers(chanrec* c); +00401 virtual userrec* FindNick(std::string nick); +00405 virtual chanrec* FindChannel(std::string channel); +00410 virtual std::string ChanMode(userrec* User, chanrec* Chan); +00414 virtual bool IsOnChannel(userrec* User, chanrec* Chan); +00417 virtual std::string GetServerName(); +00420 virtual std::string GetNetworkName(); +00426 virtual Admin GetAdmin(); +00445 virtual bool AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off); +00446 +00468 virtual bool AddExtendedListMode(char modechar); +00469 +00484 virtual void AddCommand(char* cmd, handlerfunc f, char flags, int minparams); +00485 +00507 virtual void SendMode(char **parameters, int pcnt, userrec *user); +00508 +00521 virtual void SendToModeMask(std::string modes, int flags, std::string text); +00522 +00528 virtual chanrec* JoinUserToChannel(userrec* user, std::string cname, std::string key); +00529 +00535 virtual chanrec* PartUserFromChannel(userrec* user, std::string cname, std::string reason); +00536 +00542 virtual void ChangeUserNick(userrec* user, std::string nickname); 00543 -00555 virtual void CallCommandHandler(std::string commandname, char** parameters, int pcnt, userrec* user); -00556 -00562 virtual void ChangeHost(userrec* user, std::string host); -00563 -00569 virtual void ChangeGECOS(userrec* user, std::string gecos); -00570 -00579 virtual bool IsUlined(std::string server); -00580 }; -00581 -00588 class ConfigReader : public classbase -00589 { -00590 protected: -00596 std::stringstream *cache; -00599 bool error; -00600 -00601 public: -00606 ConfigReader(); // default constructor reads ircd.conf -00610 ConfigReader(std::string filename); // read a module-specific config -00614 ~ConfigReader(); -00619 std::string ReadValue(std::string tag, std::string name, int index); -00626 int Enumerate(std::string tag); -00631 bool Verify(); -00632 -00638 int EnumerateValues(std::string tag, int index); -00639 }; -00640 -00641 -00642 -00648 class FileReader : public classbase -00649 { -00650 file_cache fc; -00651 public: -00656 FileReader(); -00657 -00663 FileReader(std::string filename); +00554 virtual void QuitUser(userrec* user, std::string reason); +00555 +00560 virtual bool MatchText(std::string sliteral, std::string spattern); +00561 +00573 virtual void CallCommandHandler(std::string commandname, char** parameters, int pcnt, userrec* user); +00574 +00580 virtual void ChangeHost(userrec* user, std::string host); +00581 +00587 virtual void ChangeGECOS(userrec* user, std::string gecos); +00588 +00597 virtual bool IsUlined(std::string server); +00598 +00602 virtual chanuserlist GetUsers(chanrec* chan); +00603 +00604 }; +00605 +00612 class ConfigReader : public classbase +00613 { +00614 protected: +00620 std::stringstream *cache; +00623 bool error; +00624 +00625 public: +00630 ConfigReader(); // default constructor reads ircd.conf +00634 ConfigReader(std::string filename); // read a module-specific config +00638 ~ConfigReader(); +00643 std::string ReadValue(std::string tag, std::string name, int index); +00650 int Enumerate(std::string tag); +00655 bool Verify(); +00656 +00662 int EnumerateValues(std::string tag, int index); +00663 }; 00664 -00668 ~FileReader(); -00669 -00675 void LoadFile(std::string filename); -00676 -00680 bool Exists(); -00681 -00686 std::string GetLine(int x); -00687 -00693 int FileSize(); -00694 }; -00695 -00696 -00703 class ModuleFactory : public classbase -00704 { -00705 public: -00706 ModuleFactory() { } -00707 virtual ~ModuleFactory() { } -00712 virtual Module * CreateModule() = 0; -00713 }; -00714 -00715 -00716 typedef DLLFactory<ModuleFactory> ircd_module; -00717 -00718 #endif -
Generated on Sat May 1 13:39:00 2004 for InspIRCd by +00665 +00666 +00672 class FileReader : public classbase +00673 { +00674 file_cache fc; +00675 public: +00680 FileReader(); +00681 +00687 FileReader(std::string filename); +00688 +00692 ~FileReader(); +00693 +00699 void LoadFile(std::string filename); +00700 +00704 bool Exists(); +00705 +00710 std::string GetLine(int x); +00711 +00717 int FileSize(); +00718 }; +00719 +00720 +00727 class ModuleFactory : public classbase +00728 { +00729 public: +00730 ModuleFactory() { } +00731 virtual ~ModuleFactory() { } +00736 virtual Module * CreateModule() = 0; +00737 }; +00738 +00739 +00740 typedef DLLFactory<ModuleFactory> ircd_module; +00741 +00742 #endif +
Generated on Sat May 1 17:50:07 2004 for InspIRCd by doxygen1.3-rc3
-- cgit v1.2.3