public static int ts3plugin_onServerErrorEvent(ulong serverConnectionHandlerID, string errorMessage, uint error, string returnCode, string extraMessage) { try { if (!string.IsNullOrEmpty(returnCode)) { if (error != 0) { VoicePlugin.Log("ERROR: {0} ({1} {2} {3})", errorMessage, error, returnCode, extraMessage); var rCode = VoicePlugin.ReturnCodeToPluginReturnCode(returnCode); if (rCode == PluginReturnCode.JOINCHANNEL) { if (error != 770) { VoicePlugin.GetConnection(serverConnectionHandlerID).LocalClient.JoinDefaultChannel(); } } } return(1); } return(0); } catch (Exception ex) { VoicePlugin.Log("Excepion in {0} : {1}", MethodInfo.GetCurrentMethod().Name, ex.Message); return(0); } }