struct searchNode *oppct_parse(searchCtx *ctx, int argc, char **argv) {
struct searchNode *thenode;
- if (ctx->type != SEARCHTYPE_CHANNEL) {
- parseError = "oppct: this function is only valid for channel searches.";
- return NULL;
- }
-
if (!(thenode=(struct searchNode *)malloc(sizeof(struct searchNode)))) {
/* couldn't malloc() memory for thenode, so free localdata to avoid leakage */
parseError = "malloc: could not allocate memory for this search.";
for (i=0;i<cip->channel->users->hashsize;i++) {
if (cip->channel->users->content[i]!=nouser) {
- if (!(cip->channel->users->content[i] & CUMODE_OP)) {
+ if (cip->channel->users->content[i] & CUMODE_OP) {
ops++;
}
}
}
void oppct_free(searchCtx *ctx, struct searchNode *thenode) {
+ ctx->reply(senderNSExtern, "Notice: oppct is deprecated by cumodepct");
free(thenode);
}