Hard fork settings and client disconnect

Some code to Hard fork settings and client disconnect.