You would put that script code in the remote.ini file

In mirc under Tools Remote

In the top left corner it should say "Editing remote.ini"

If it does not, use the View menu to select remote.ini

Then type or copy the code Watchdog showed you into the file.

It will run automatically when someone joins a channel