If I'm understanding this correctly, you want to be able to open a query with a user, be able to type !ignore which will add the user to your ignore list and then, echo to them that they were ignored.
You can't use an on text event for yourself but, you could add this to your alias (Alt + R -- Alias tab)
/ignoreuser { ; Specify user after
ignore $2
say I am now ignoring you
}
This is just a start and I composed it here in this window. I am sure someone will come by and offer a better solution but, this will point you in the direction you need to look.