chuushi/CoreProtect-Lookup-Web-Interface

Exclusive Filter for Keyword Search

Dyllaann opened this issue · 5 comments

Hey.

I was wondering if there was a way to implement a filter for results?
I don't want /login and /register commands showing up in the logs.

I can look into it when I have more free time. It's definitely something I will want to add.

Found a hardcode way to do this myself.

/res/js/lookup.js : line 485

485 for (i = 0; i<r.length; i++) {
486            if((r[i].data.indexOf("login") !== -1) || (r[i].data.indexOf("register") !== -1)){continue;}
487            // UNIX to JS Date

Copy and paste my line 486 and paste it in between the for loop and comment.

I might code it in the PHP backend rather than after getting the data. I'll most likely do it this month.

I'll look into implementing this at pre3 or pre4, which should come in the coming weeks!

Somewhat related to this. I am using sqlite database (for the moment) and the keyword search seemed to be not working at all.

I had implemented it for the Chat Messages, Commands and Usernames. Can push or send details of the implementation.

I have some potential TODO:

  • allow multiple keywords (for example | (pipe) or space separated)
  • add Exclude switch to filter out the typed keywords

Interrested?