You can either modify the code on your own or use a version that looks at the light switch too.
Modifying the code is primarily dependent on having an understanding of an approach to get what you want to happen. The code is obviously an issue, but understanding what needs to happen is critical. If you think the change is minor, I'd recommend copying the Smart Lights code and changing it as you need (that way you have the original file to fall back to).
The problem I think you have is that switches are not really supported by the original Smart Lights code. I wanted more capability and wrote the Advanced Smart Lights code. It can use a switch to override the motion sensor or start a timeout on its own. Give it a look and see if it does what you want. Be aware though, I wrote it for X10 and do not have any way to test it for other systems. It should work, but there may need to be some tweaks.