]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_callerid.cpp
m_flashpolicyd, m_httpd Store sockets in a intrusive list
[user/henk/code/inspircd.git] / src / modules / m_callerid.cpp
index 6f2c6730085560a8715ffc53fdfa09993c76970f..7f615494b8380a47750cb3a96932c0135bf40530 100644 (file)
@@ -136,10 +136,7 @@ struct CallerIDExtInfo : public ExtensionItem
                                continue; // shouldn't happen, but oh well.
                        }
 
-                       std::list<callerid_data*>::iterator it2 = std::find(targ->wholistsme.begin(), targ->wholistsme.end(), dat);
-                       if (it2 != targ->wholistsme.end())
-                               targ->wholistsme.erase(it2);
-                       else
+                       if (!stdalgo::erase(targ->wholistsme, dat))
                                ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "ERROR: Inconsistency detected in callerid state, please report (2)");
                }
                delete dat;
@@ -183,7 +180,7 @@ public:
                extInfo(Creator)
        {
                allow_empty_last_param = false;
-               syntax = "{[+|-]<nicks>}|*}";
+               syntax = "*|(+|-)<nick>[,(+|-)<nick> ...]";
                TRANSLATE1(TR_CUSTOM);
        }
 
@@ -323,11 +320,7 @@ public:
                        return false;
                }
 
-               std::list<callerid_data*>::iterator it = std::find(dat2->wholistsme.begin(), dat2->wholistsme.end(), dat);
-               if (it != dat2->wholistsme.end())
-                       // Found me!
-                       dat2->wholistsme.erase(it);
-               else
+               if (!stdalgo::erase(dat2->wholistsme, dat))
                        ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "ERROR: Inconsistency detected in callerid state, please report (4)");