|
|||
|
|||
|


Public Member Functions | |
| ModuleCallerID (InspIRCd *Me) | |
| virtual | ~ModuleCallerID () |
| virtual Version | GetVersion () |
| Returns the version number of a Module. | |
| virtual void | On005Numeric (std::string &output) |
| Called when a 005 numeric is about to be output. | |
| int | PreText (User *user, User *dest, std::string &text, bool notice) |
| virtual int | OnUserPreMessage (User *user, void *dest, int target_type, std::string &text, char status, CUList &exempt_list) |
| Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done. | |
| virtual int | OnUserPreNotice (User *user, void *dest, int target_type, std::string &text, char status, CUList &exempt_list) |
| Called whenever a user is about to NOTICE A user or a channel, before any processing is done. | |
| virtual void | OnCleanup (int type, void *item) |
| Called before your module is unloaded to clean up Extensibles. | |
| virtual void | OnSyncUserMetaData (User *user, Module *proto, void *opaque, const std::string &extname, bool displayable) |
| virtual void | OnDecodeMetaData (int target_type, void *target, const std::string &extname, const std::string &extdata) |
| Allows module data, sent via ProtoSendMetaData, to be decoded again by a receiving module. | |
| virtual int | OnUserPreNick (User *user, const std::string &newnick) |
| Called before any nickchange, local or remote. | |
| virtual void | OnUserQuit (User *user, const std::string &message, const std::string &oper_message) |
| Called when a user quits. | |
| virtual void | OnRehash (User *user, const std::string ¶meter) |
| Called on rehash. | |
Private Attributes | |
| CommandAccept * | mycommand |
| User_g * | myumode |
| unsigned int | maxaccepts |
| bool | operoverride |
| bool | tracknick |
| unsigned int | notify_cooldown |
Definition at line 272 of file m_callerid.cpp.
|
|
Definition at line 285 of file m_callerid.cpp. References InspIRCd::AddCommand(), ModeParser::AddMode(), ModuleManager::Attach(), I_On005Numeric, I_OnCleanup, I_OnRehash, I_OnUserPreMessage, I_OnUserPreNick, I_OnUserPreNotice, I_OnUserQuit, maxaccepts, InspIRCd::Modes, InspIRCd::Modules, mycommand, myumode, OnRehash(), and Module::ServerInstance. |
|
|
Definition at line 312 of file m_callerid.cpp. References ModeParser::DelMode(), InspIRCd::Modes, myumode, and Module::ServerInstance. |
|
|
Returns the version number of a Module. The method should return a Version object with its version information assigned via Version::Version Reimplemented from Module. Definition at line 318 of file m_callerid.cpp. References API_VERSION, VF_COMMON, and VF_VENDOR. |
|
|
Called when a 005 numeric is about to be output. The module should modify the 005 numeric if needed to indicate its features.
Reimplemented from Module. Definition at line 323 of file m_callerid.cpp. |
|
||||||||||||
|
Called before your module is unloaded to clean up Extensibles. This method is called once for every user and channel on the network, so that when your module unloads it may clear up any remaining data in the form of Extensibles added using Extensible::Extend(). If the target_type variable is TYPE_USER, then void* item refers to a User*, otherwise it refers to a Channel*.
Reimplemented from Module. Definition at line 371 of file m_callerid.cpp. References RemoveData(), and TYPE_USER. |
|
||||||||||||||||||||
|
Allows module data, sent via ProtoSendMetaData, to be decoded again by a receiving module. Please see src/modules/m_swhois.cpp for a working example of how to use this method call.
Reimplemented from Module. Definition at line 394 of file m_callerid.cpp. References Extensible::Extend(), Module::ServerInstance, and TYPE_USER. |
|
||||||||||||
|
Called on rehash. This method is called prior to a /REHASH or when a SIGHUP is received from the operating system. You should use it to reload any files so that your module keeps in step with the rest of the application. If a parameter is given, the core has done nothing. The module receiving the event can decide if this parameter has any relevence to it.
Reimplemented from Module. Definition at line 417 of file m_callerid.cpp. References Conf, maxaccepts, notify_cooldown, operoverride, ConfigReader::ReadFlag(), ConfigReader::ReadInteger(), Module::ServerInstance, and tracknick. Referenced by ModuleCallerID(). |
|
||||||||||||||||||||||||
|
Reimplemented from Module. Definition at line 381 of file m_callerid.cpp. References GetData(), Module::ProtoSendMetaData(), callerid_data::ToString(), and TYPE_USER. |
|
||||||||||||||||||||||||||||
|
Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done. Returning any nonzero value from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. This is useful for modules which may want to filter or redirect messages. target_type can be one of TYPE_USER or TYPE_CHANNEL. If the target_type value is a user, you must cast dest to a User* otherwise you must cast it to a Channel*, this is the details of where the message is destined to be sent.
Reimplemented from Module. Definition at line 355 of file m_callerid.cpp. |
|
||||||||||||
|
Called before any nickchange, local or remote. This can be used to implement Q-lines etc. Please note that although you can see remote nickchanges through this function, you should NOT make any changes to the User if the user is a remote user as this may cause a desnyc. check user->server before taking any action (including returning nonzero from the method). If your method returns nonzero, the nickchange is silently forbidden, and it is down to your module to generate some meaninful output.
Reimplemented from Module. Definition at line 404 of file m_callerid.cpp. References RemoveFromAllAccepts(), Module::ServerInstance, and tracknick. |
|
||||||||||||||||||||||||||||
|
Called whenever a user is about to NOTICE A user or a channel, before any processing is done. Returning any nonzero value from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. This is useful for modules which may want to filter or redirect messages. target_type can be one of TYPE_USER or TYPE_CHANNEL. If the target_type value is a user, you must cast dest to a User* otherwise you must cast it to a Channel*, this is the details of where the message is destined to be sent. You may alter the message text as you wish before relinquishing control to the next module in the chain, and if no other modules block the text this altered form of the text will be sent out to the user and possibly to other servers.
Reimplemented from Module. Definition at line 363 of file m_callerid.cpp. |
|
||||||||||||||||
|
Called when a user quits. The details of the exiting user are available to you in the parameter User *user This event is only called when the user is fully registered when they quit. To catch raw disconnections, use the OnUserDisconnect method.
Reimplemented from Module. Definition at line 411 of file m_callerid.cpp. References RemoveData(), RemoveFromAllAccepts(), and Module::ServerInstance. |
|
||||||||||||||||||||
|
Definition at line 328 of file m_callerid.cpp. References callerid_data::accepting, User::dhost, GetData(), User::ident, IS_OPER, User::IsModeSet(), callerid_data::lastnotify, User::nick, notify_cooldown, operoverride, Module::ServerInstance, InspIRCd::Time(), and User::WriteNumeric(). Referenced by OnUserPreMessage(), and OnUserPreNotice(). |
|
|
Definition at line 279 of file m_callerid.cpp. Referenced by ModuleCallerID(), and OnRehash(). |
|
|
Definition at line 275 of file m_callerid.cpp. Referenced by ModuleCallerID(). |
|
|
Definition at line 276 of file m_callerid.cpp. Referenced by ModuleCallerID(), and ~ModuleCallerID(). |
|
|
Definition at line 282 of file m_callerid.cpp. Referenced by OnRehash(), and PreText(). |
|
|
Definition at line 280 of file m_callerid.cpp. Referenced by OnRehash(), and PreText(). |
|
|
Definition at line 281 of file m_callerid.cpp. Referenced by OnRehash(), and OnUserPreNick(). |