Perhaps unrelated to your question, but a problem all the same...
Code:
format(wmsg, 224, "[Stormsys] %s", get_cvar_num("sshp_welcomemsg"))
You should either change %s to %i (or %d) or you should change get_cvar_num(...) to get_cvar_str(...).
Actually, I see you are consistently using get_cvar_num where it appears you should be using get_cvar_str. In the code you've shown us, change all occurences of get_cvar_num to get_cvar_str. Be sure to look the function up though, because the arguments you pass are slightly different.