-/** The ModuleMessage class is the base class of Request and Event
- * This class is used to represent a basic data structure which is passed
- * between modules for safe inter-module communications.
- */
-class CoreExport ModuleMessage : public Extensible
-{
- public:
- /** Destructor
- */
- virtual ~ModuleMessage() {};
-};
-
/** The Request class is a unicast message directed at a given module.
* When this class is properly instantiated it may be sent to a module
* using the Send() method, which will call the given module's OnRequest
* method with this class as its parameter.
*/
/** The Request class is a unicast message directed at a given module.
* When this class is properly instantiated it may be sent to a module
* using the Send() method, which will call the given module's OnRequest
* method with this class as its parameter.
*/
/** This should be a null-terminated string identifying the type of request,
* all modules should define this and use it to determine the nature of the
* request before they attempt to cast the Request in any way.
*/
/** This should be a null-terminated string identifying the type of request,
* all modules should define this and use it to determine the nature of the
* request before they attempt to cast the Request in any way.
*/
/** This is a pointer to the sender of the message, which can be used to
* directly trigger events, or to create a reply.
*/
/** This is a pointer to the sender of the message, which can be used to
* directly trigger events, or to create a reply.
*/
- Module* dest;
- public:
- /** Create a new Request
- * This is for the 'old' way of casting whatever the data is
- * to char* and hoping you get the right thing at the other end.
- * This is slowly being depreciated in favor of the 'new' way.
- */
- Request(char* anydata, Module* src, Module* dst);
/** Create a new Request
* This is for the 'new' way of defining a subclass
* of Request and defining it in a common header,
* passing an object of your Request subclass through
* as a Request* and using the ID string to determine
/** Create a new Request
* This is for the 'new' way of defining a subclass
* of Request and defining it in a common header,
* passing an object of your Request subclass through
* as a Request* and using the ID string to determine
- * what to cast it back to and the other end. This is
- * much safer as there are no casts not confirmed by
- * the ID string, and all casts are child->parent and
- * can be checked at runtime with dynamic_cast<>()
+ * what to cast it back to and the other end.
* using the Send() method, which will trigger the OnEvent method in
* all modules passing the object as its parameter.
*/
* using the Send() method, which will trigger the OnEvent method in
* all modules passing the object as its parameter.
*/
/** This is a pointer to the sender of the message, which can be used to
* directly trigger events, or to create a reply.
*/
/** This is a pointer to the sender of the message, which can be used to
* directly trigger events, or to create a reply.
*/
/** The event identifier.
* This is arbitary text which should be used to distinguish
* one type of event from another.
*/
/** The event identifier.
* This is arbitary text which should be used to distinguish
* one type of event from another.
*/
- Event(char* anydata, Module* src, const std::string &eventid);
- /** Get the Event data
- */
- char* GetData();
- /** Get the event Source
- */
- Module* GetSource();
- /** Get the event ID.
- * Use this to determine the event type for safe casting of the data
- */
- std::string GetEventID();
+ Event(Module* src, const std::string &eventid);
I_OnUserPreInvite, I_OnUserInvite, I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserPreNick,
I_OnUserMessage, I_OnUserNotice, I_OnMode, I_OnGetServerDescription, I_OnSyncUser,
I_OnSyncChannel, I_OnDecodeMetaData, I_OnWallops,
I_OnUserPreInvite, I_OnUserInvite, I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserPreNick,
I_OnUserMessage, I_OnUserNotice, I_OnMode, I_OnGetServerDescription, I_OnSyncUser,
I_OnSyncChannel, I_OnDecodeMetaData, I_OnWallops,
- I_OnChangeHost, I_OnChangeName, I_OnAddLine, I_OnDelLine, I_OnExpireLine, I_OnCleanup,
+ I_OnChangeHost, I_OnChangeName, I_OnAddLine, I_OnDelLine, I_OnExpireLine,
I_OnUserPostNick, I_OnPreMode, I_On005Numeric, I_OnKill, I_OnRemoteKill, I_OnLoadModule,
I_OnUnloadModule, I_OnBackgroundTimer, I_OnPreCommand, I_OnCheckReady, I_OnCheckInvite,
I_OnRawMode, I_OnCheckKey, I_OnCheckLimit, I_OnCheckBan, I_OnCheckChannelBan, I_OnExtBanCheck,
I_OnStats, I_OnChangeLocalUserHost, I_OnChangeLocalUserGecos, I_OnPreTopicChange,
I_OnUserPostNick, I_OnPreMode, I_On005Numeric, I_OnKill, I_OnRemoteKill, I_OnLoadModule,
I_OnUnloadModule, I_OnBackgroundTimer, I_OnPreCommand, I_OnCheckReady, I_OnCheckInvite,
I_OnRawMode, I_OnCheckKey, I_OnCheckLimit, I_OnCheckBan, I_OnCheckChannelBan, I_OnExtBanCheck,
I_OnStats, I_OnChangeLocalUserHost, I_OnChangeLocalUserGecos, I_OnPreTopicChange,
- I_OnPostTopicChange, I_OnEvent, I_OnRequest, I_OnGlobalOper, I_OnPostConnect, I_OnAddBan,
+ I_OnPostTopicChange, I_OnEvent, I_OnGlobalOper, I_OnPostConnect, I_OnAddBan,
I_OnDelBan, I_OnChangeLocalUserGECOS, I_OnUserRegister, I_OnChannelPreDelete, I_OnChannelDelete,
I_OnPostOper, I_OnSyncNetwork, I_OnSetAway, I_OnUserList, I_OnPostCommand, I_OnPostJoin,
I_OnWhoisLine, I_OnBuildNeighborList, I_OnGarbageCollect,
I_OnDelBan, I_OnChangeLocalUserGECOS, I_OnUserRegister, I_OnChannelPreDelete, I_OnChannelDelete,
I_OnPostOper, I_OnSyncNetwork, I_OnSetAway, I_OnUserList, I_OnPostCommand, I_OnPostJoin,
I_OnWhoisLine, I_OnBuildNeighborList, I_OnGarbageCollect,
- /** Called whenever an Event class is sent to all module by another module.
- * Please see the documentation of Event::Send() for further information. The Event sent can
- * always be assumed to be non-NULL, you should *always* check the value of Event::GetEventID()
- * before doing anything to the event data, and you should *not* change the event data in any way!
+ /** Called whenever an Event class is sent to all modules by another module.
+ * You should *always* check the value of Event::id to determine the event type.
- * Please see the documentation of Request::Send() for further information. The Request sent
- * can always be assumed to be non-NULL, you should not change the request object or its data.
- * Your method may return arbitary data in the char* result which the requesting module
- * may be able to use for pre-determined purposes (e.g. the results of an SQL query, etc).
+ * The value of Request::id should be used to determine the type of request.
/** Called whenever a password check is to be made. Replaces the old OldOperCompare API.
* The password field (from the config file) is in 'password' and is to be compared against
/** Called whenever a password check is to be made. Replaces the old OldOperCompare API.
* The password field (from the config file) is in 'password' and is to be compared against