+ /** Removes a user from all accept lists
+ * @param who The user to remove from accepts
+ */
+ void RemoveFromAllAccepts(User* who)
+ {
+ // First, find the list of people who have me on accept
+ callerid_data *userdata = GetData(who, false);
+ if (!userdata)
+ return;
+
+ // Iterate over the list of people who accept me, and remove all entries
+ for (std::list<callerid_data *>::iterator it = userdata->wholistsme.begin(); it != userdata->wholistsme.end(); it++)
+ {
+ callerid_data *dat = *(it);
+
+ // Find me on their callerid list
+ std::set<User *>::iterator it2 = dat->accepting.find(who);
+
+ if (it2 != dat->accepting.end())
+ dat->accepting.erase(it2);
+ }
+
+ userdata->wholistsme.clear();
+ }
+