+ /* For channel searches, mark up all the nicks in the relevant channels first */
+ if (ctx->searchcmd == reg_chansearch) {
+ nickmarker=nextnickmarker();
+ for (i=0;i<CHANNELHASHSIZE;i++) {
+ for (cip=chantable[i];cip;cip=cip->next) {
+ /* Skip empty and non-matching channels */
+ if (!cip->channel || cip->marker != localdata->marker)
+ continue;
+
+ for (j=0;j<cip->channel->users->hashsize;j++) {
+ if (cip->channel->users->content[j]==nouser)
+ continue;
+
+ if ((np=getnickbynumeric(cip->channel->users->content[j])))
+ np->marker=nickmarker;
+ }
+ }
+ }
+ } else {
+ /* For nick searches they're already marked, pick up the saved value */
+ nickmarker=localdata->marker;
+ }
+
+ /* Now do the actual kills */