bool Unwatch(LocalUser* user, const std::string& nick) { WatchedList* list = GetWatchedPriv(user); if (!list) return false; bool ret = RemoveWatcher(nick, user, *list); // If no longer watching any nick unset ext if (list->empty()) ext.unset(user); return ret; }
void UnwatchAll(LocalUser* user) { WatchedList* list = GetWatchedPriv(user); if (!list) return; while (!list->empty()) { Entry* entry = list->front(); RemoveWatcher(entry->GetNick(), user, *list); } ext.unset(user); }
bool WatcherMgr::RemoveWatcher(SharedPtr<WatcherBase> pWatcher) { if(pWatcher.isNull()) return false; return RemoveWatcher(pWatcher->GetConnID()); }