Update scserver.js

Remove duplicate logic code