* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*
- * $Id: REMGLINECommand.cc,v 1.26 2006/09/26 17:36:00 kewlio Exp $
+ * $Id: REMGLINECommand.cc,v 1.27 2009/06/14 01:29:54 hidden1 Exp $
*/
#include <string>
#include "Constants.h"
#include "gnuworld_config.h"
-RCSTAG( "$Id: REMGLINECommand.cc,v 1.26 2006/09/26 17:36:00 kewlio Exp $" ) ;
+RCSTAG( "$Id: REMGLINECommand.cc,v 1.27 2009/06/14 01:29:54 hidden1 Exp $" ) ;
namespace gnuworld
{
return false;
}
+if (st[1].find('@',1) == string::npos)
+ {
+ bot->Notice(theClient, "Invalid G-line. Please specify a user@. i.e: REMGLINE *@ip");
+ return false;
+ }
+
unsigned int dummy;
if(bot->checkGline(st[1],0,dummy) & gline::HUH_NO_HOST)
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*
- * $Id: ccontrol.cc,v 1.229 2009/06/13 06:43:34 hidden1 Exp $
+ * $Id: ccontrol.cc,v 1.230 2009/06/14 01:29:54 hidden1 Exp $
*/
#define MAJORVER "1"
#include "ccontrol_generic.h"
#include "gnuworld_config.h"
-RCSTAG( "$Id: ccontrol.cc,v 1.229 2009/06/13 06:43:34 hidden1 Exp $" ) ;
+RCSTAG( "$Id: ccontrol.cc,v 1.230 2009/06/14 01:29:54 hidden1 Exp $" ) ;
namespace gnuworld
{
return false;
}
bool status = Shellnb->Delete();
-bool del = false;
shellnbListType::iterator Itr = shellnbList.begin();
-for (; Itr != shellnbList.end(); Itr++) {
- if (del)
- Itr--;
- del = false;
+while (Itr != shellnbList.end()) {
if (*Itr == Shellnb) {
Itr = shellnbList.erase(Itr);
- del = true;
}
-}
-if (del) {
- Itr--;
- if (*Itr == Shellnb)
- shellnbList.erase(Itr);
+ else
+ Itr++;
}
shellcoMap[Shellnb->shellco] -= shellnbMap[Shellnb];
shellnbMap.erase(Shellnb);
return false;
}
-bool del = false;
shellcoListType::iterator Itr = shellcoList.begin();
-for (; Itr != shellcoList.end(); Itr++) {
- if (del)
- Itr--;
- del = false;
+while (Itr != shellcoList.end()) {
if (*Itr == Shellco) {
Itr = shellcoList.erase(Itr);
- del = true;
}
-}
-if (del) {
- Itr--;
- if (*Itr == Shellco)
- shellcoList.erase(Itr);
+ else
+ Itr++;
}
-del = false;
shellnbIterator ptr = shellnbList.begin();
-for (; ptr != shellnbList.end(); ptr++) {
+while (ptr != shellnbList.end()) {
shellnbIterator ptr2;
- if (del)
- ptr--;
- del = false;
if ((*ptr)->shellco == Shellco) {
ptr2 = ptr;
ptr2++;
Notice(theClient,"Error while deleting netblock '%s'",(*ptr)->getCidr().c_str());
}
ptr = ptr2;
- del = true;
- }
-}
-if (del) {
- ptr--;
- if ((*ptr)->shellco == Shellco) {
- if (!delShellnb(theClient, (*ptr)->getCidr())) {
- Notice(theClient,"Error while deleting netblock '%s'",(*ptr)->getCidr().c_str());
- }
}
+ else
+ ptr++;
}
bool status = Shellco->Delete();
shellcoMap.erase(Shellco);