void *timestamp_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput) {
nick *np = (nick *)theinput;
-
- return (void *)np->timestamp;
+ chanindex *cip = (chanindex *)theinput;
+
+ if (ctx->searchcmd == reg_nicksearch || ctx->searchcmd == reg_whowassearch) {
+ return (void *)np->timestamp;
+ } else {
+ if (cip->channel)
+ return (void *)cip->channel->timestamp;
+ else
+ return 0;
+ }
}
void timestamp_free(searchCtx *ctx, struct searchNode *thenode) {