unsigned int marker;
unsigned int duration;
int count;
- searchNode **nodes;
};
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();
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;
/* 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);
}
struct kill_localdata {
unsigned int marker;
int count;
- searchNode **nodes;
};
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();
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;
/* 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);
}