]> jfr.im git - irc/quakenet/newserv.git/commitdiff
removed usless nodes datatype from kill_localdata/gline_localdata (+ corresponding...
authorIan Barker <redacted>
Wed, 30 May 2007 01:28:02 +0000 (02:28 +0100)
committerIan Barker <redacted>
Wed, 30 May 2007 01:28:02 +0000 (02:28 +0100)
newsearch/ns-gline.c
newsearch/ns-kill.c

index 3d616ceccfdbe15f0edaf9670072c15e0a896326..3dd2321fa6c3a6f9078d22af0365155afb9178e3 100644 (file)
@@ -22,7 +22,6 @@ struct gline_localdata {
   unsigned int marker;
   unsigned int duration;
   int count;
-  searchNode **nodes;
 };
 
 struct searchNode *gline_parse(int type, int argc, char **argv) {
@@ -30,7 +29,6 @@ struct searchNode *gline_parse(int type, int argc, char **argv) {
   struct searchNode *thenode;
 
   localdata = (struct gline_localdata *) malloc(sizeof(struct gline_localdata));
-  localdata->nodes = (struct searchNode **) malloc(sizeof(struct searchNode *) * argc);
   localdata->count = 0;
   localdata->marker = nextnickmarker();
 
@@ -83,7 +81,6 @@ void gline_free(struct searchNode *thenode) {
   if (localdata->count > NSMAX_GLINE_LIMIT) {
     /* need to warn the user that they have just tried to twat half the network ... */
     controlreply(senderNSExtern, "Warning: your pattern matches too many users (%d) - nothing done.", localdata->count);
-    free(localdata->nodes);
     free(localdata);
     free(thenode);
     return;
@@ -111,7 +108,6 @@ void gline_free(struct searchNode *thenode) {
   /* notify opers of the action */
   controlwall(NO_OPER, NL_GLINES, "%s/%s glined %d %s via nicksearch for %s [%d untouched].", senderNSExtern->nick, senderNSExtern->authname, localdata->count, 
     localdata->count != 1 ? "users" : "user", longtoduration(localdata->duration, 1), safe);
-  free(localdata->nodes);
   free(localdata);
   free(thenode);
 }
index 30455dc7173060ab3cca90c7b1be5131b584ec4c..a2e08d23e9df87edb0c3e6e8e8ed311184187a8d 100644 (file)
@@ -21,7 +21,6 @@ void kill_free(struct searchNode *thenode);
 struct kill_localdata {
   unsigned int marker;
   int count;
-  searchNode **nodes;
 };
 
 struct searchNode *kill_parse(int type, int argc, char **argv) {
@@ -29,7 +28,6 @@ struct searchNode *kill_parse(int type, int argc, char **argv) {
   struct searchNode *thenode;
 
   localdata = (struct kill_localdata *) malloc(sizeof(struct kill_localdata));
-  localdata->nodes = (struct searchNode **) malloc(sizeof(struct searchNode *) * argc);
   localdata->count = 0;
   localdata->marker = nextnickmarker();
 
@@ -72,7 +70,6 @@ void kill_free(struct searchNode *thenode) {
   if (localdata->count > NSMAX_KILL_LIMIT) {
     /* need to warn the user that they have just tried to twat half the network ... */
     controlreply(senderNSExtern, "Warning: your pattern matches too many users (%d) - nothing done.", localdata->count);
-    free(localdata->nodes);
     free(localdata);
     free(thenode);
     return;
@@ -96,7 +93,6 @@ void kill_free(struct searchNode *thenode) {
   /* notify opers of the action */
   controlwall(NO_OPER, NL_KICKKILLS, "%s/%s killed %d %s via nicksearch [%d untouched].", senderNSExtern->nick, senderNSExtern->authname, localdata->count, 
     localdata->count != 1 ? "users" : "user", safe);
-  free(localdata->nodes);
   free(localdata);
   free(thenode);
 }