struct notice_localdata {
unsigned int marker;
int count;
- int type;
char message[NSMAX_NOTICE_LEN];
};
-struct searchNode *notice_parse(searchCtx *ctx, int type, int argc, char **argv) {
+struct searchNode *notice_parse(searchCtx *ctx, int argc, char **argv) {
struct notice_localdata *localdata;
struct searchNode *thenode;
int len;
return NULL;
}
localdata->count = 0;
- localdata->type = type;
- if (type == SEARCHTYPE_CHANNEL)
+ if (ctx->type == SEARCHTYPE_CHANNEL)
localdata->marker = nextchanmarker();
else
localdata->marker = nextnickmarker();
localdata = thenode->localdata;
- if (localdata->type == SEARCHTYPE_CHANNEL) {
+ if (ctx->type == SEARCHTYPE_CHANNEL) {
cip = (chanindex *)theinput;
cip->marker = localdata->marker;
localdata->count += cip->channel->users->totalusers;
localdata = thenode->localdata;
- if (localdata->type == SEARCHTYPE_CHANNEL) {
+ if (ctx->type == SEARCHTYPE_CHANNEL) {
nickmarker=nextnickmarker();
for (i=0;i<CHANNELHASHSIZE;i++) {
for (cip=chantable[i];cip;cip=ncip) {
}
}
/* notify opers of the action */
- controlwall(NO_OPER, NL_BROADCASTS, "%s/%s sent the following message to %d %s: %s", senderNSExtern->nick, senderNSExtern->authname, localdata->count, localdata->count != 1 ? "users" : "user", localdata->message);
+ ctx->wall(NL_BROADCASTS, "%s/%s sent the following message to %d %s: %s", senderNSExtern->nick, senderNSExtern->authname, localdata->count, localdata->count != 1 ? "users" : "user", localdata->message);
free(localdata);
free(thenode);
}