Sounds like you need to obtain the userID from the tags in a PRIVMSG and react accordingly.
If you are using a library, then the library should expose this.
or if you are libraryless parsing a PRIVMSG should spit it out something along the lines of message.tags['user-id']
Wihthout any code can only suggest where to look!