- return PreText(user, (User*)dest, text, true);
-
- return 0;
- }
-
- virtual int OnUserPreNotice(User* user, void* dest, int target_type, std::string& text, char status, CUList &exempt_list)
- {
- if (IS_LOCAL(user) && target_type == TYPE_USER)
- return PreText(user, (User*)dest, text, true);
-
- return 0;
- }
-
- virtual void OnCleanup(int type, void* item)
- {
- if (type != TYPE_USER)
- return;
-
- User* u = (User*)item;
- /* Cleanup only happens on unload (before dtor), so keep this O(n) instead of O(n^2) which deferring to OnUserQuit would do. */
- RemoveData(u);
- }
-
- virtual void OnSyncUserMetaData(User* user, Module* proto, void* opaque, const std::string& extname, bool displayable)
- {
- if (extname == "callerid_data")
- {
- callerid_data* dat = GetData(user, false);
- if (dat)
- {
- std::string str = dat->ToString(displayable);
- proto->ProtoSendMetaData(opaque, TYPE_USER, user, extname, str);
- }
- }
- }