sourcemod
                                
                                 sourcemod copied to clipboard
                                
                                    sourcemod copied to clipboard
                            
                            
                            
                        Clear functions if plugin is paused.
You do fwd->RemoveFunctionsOfPlugin(plugin); only in OnPluginUnloaded. If the plugin has been paused (SetFailState/crash), function GetForwardFunctionCount starts to return not exactly the information we want and there is a chance that we are needlessly calling the event.
It sounds like what you want is a "has active listeners" bit that is maintained within the forward subsystem. That's a reasonable request, but we already do filter for inactive forwards, and the overhead is not high.