|
|||
|
|||
|


Public Member Functions | |
| Modulewatch (InspIRCd *Me) | |
| virtual void | OnRehash (User *user, const std::string ¶meter) |
| Called on rehash. | |
| virtual int | OnSetAway (User *user, const std::string &awaymsg) |
| Called whenever a user sets away or returns from being away. | |
| virtual void | OnUserQuit (User *user, const std::string &reason, const std::string &oper_message) |
| Called when a user quits. | |
| virtual void | OnGarbageCollect () |
| Called at intervals for modules to garbage-collect any hashes etc. | |
| virtual void | OnCleanup (int target_type, void *item) |
| Called before your module is unloaded to clean up Extensibles. | |
| virtual void | OnPostConnect (User *user) |
| Called after a user has fully connected and all modules have executed OnUserConnect This event is informational only. | |
| virtual void | OnUserPostNick (User *user, const std::string &oldnick) |
| Called after any nickchange, local or remote. | |
| virtual void | On005Numeric (std::string &output) |
| Called when a 005 numeric is about to be output. | |
| virtual | ~Modulewatch () |
| virtual Version | GetVersion () |
| Returns the version number of a Module. | |
Private Attributes | |
| CommandWatch * | mycommand |
| CommandSVSWatch * | sw |
| unsigned int | maxwatch |
Definition at line 373 of file m_watch.cpp.
|
|
Definition at line 380 of file m_watch.cpp. References InspIRCd::AddCommand(), ModuleManager::Attach(), I_On005Numeric, I_OnCleanup, I_OnGarbageCollect, I_OnPostConnect, I_OnRehash, I_OnSetAway, I_OnUserPostNick, I_OnUserQuit, maxwatch, InspIRCd::Modules, mycommand, OnRehash(), Module::ServerInstance, sw, and whos_watching_me. |
|
|
Definition at line 559 of file m_watch.cpp. References whos_watching_me. |
|
|
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 564 of file m_watch.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 553 of file m_watch.cpp. References ConvToStr(), and maxwatch. |
|
||||||||||||
|
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 486 of file m_watch.cpp. References Extensible::GetExt(), Extensible::Shrink(), and TYPE_USER. |
|
|
Called at intervals for modules to garbage-collect any hashes etc. Certain data types such as hash_map 'leak' buckets, which must be tidied up and freed by copying into a new item every so often. This method is called when it is time to do that. Reimplemented from Module. Definition at line 475 of file m_watch.cpp. References whos_watching_me. |
|
|
Called after a user has fully connected and all modules have executed OnUserConnect This event is informational only. You should not change any user information in this event. To do so, use the OnUserConnect method to change the state of local users. This is called for both local and remote users.
Reimplemented from Module. Definition at line 501 of file m_watch.cpp. References classbase::age, ConvToStr(), User::dhost, User::ident, User::nick, User::Visibility, VisData::VisibleTo(), and whos_watching_me. |
|
||||||||||||
|
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 393 of file m_watch.cpp. References Conf, maxwatch, ConfigReader::ReadInteger(), and Module::ServerInstance. Referenced by Modulewatch(). |
|
||||||||||||
|
Called whenever a user sets away or returns from being away. The away message is available as a parameter, but should not be modified. At this stage, it has already been copied into the user record. If awaymsg is empty, the user is returning from away.
Reimplemented from Module. Definition at line 401 of file m_watch.cpp. References ConvToStr(), User::dhost, User::ident, User::nick, Module::ServerInstance, InspIRCd::Time(), User::Visibility, VisData::VisibleTo(), and whos_watching_me. |
|
||||||||||||
|
Called after any nickchange, local or remote. This can be used to track users after nickchanges have been applied. 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). Because this method is called after the nickchange is taken place, no return values are possible to indicate forbidding of the nick change. Use OnUserPreNick for this.
Reimplemented from Module. Definition at line 519 of file m_watch.cpp. References classbase::age, ConvToStr(), User::dhost, User::ident, User::nick, User::Visibility, VisData::VisibleTo(), and whos_watching_me. |
|
||||||||||||||||
|
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 430 of file m_watch.cpp. References User::dhost, Extensible::GetExt(), User::ident, User::nick, Module::ServerInstance, Extensible::Shrink(), InspIRCd::Time(), User::Visibility, VisData::VisibleTo(), and whos_watching_me. |
|
|
Definition at line 377 of file m_watch.cpp. Referenced by Modulewatch(), On005Numeric(), and OnRehash(). |
|
|
Definition at line 375 of file m_watch.cpp. Referenced by Modulewatch(). |
|
|
Definition at line 376 of file m_watch.cpp. Referenced by Modulewatch(). |