Raised This Month: $433 Target: $400

How to recognize <Disabled> plugin?

Post New Thread Reply   
Thread Tools Display Modes
Author Message
Veteran Member
Join Date: Nov 2017
Location: Ukraine
Old 03-18-2020 , 11:59   How to recognize <Disabled> plugin?
Reply With Quote #1

sm returns INVALID_HANDLE when retrieving <disabled> plugin's handle, even if plugin is listed:

PHP Code:
sm plugins list
52 Disabled"[ANY] Sample" (1.0by XXX 
and considered as loaded:

PHP Code:
sm plugins load fault.smx
[SMPlugin fault.smx is already loaded
so by logic, GetPluginStatus() should have an opportunity to show status: Plugin_Running

but it require plugin handle, that I cannot provide.

Is it a bug?

PHP Code:
public APLRes AskPluginLoad2(Handle myselfbool latechar[] errorint err_max)

+ map change (to reproduce).

PHP Code:
public void OnPluginStart()

Action CmdIter(int clientint args)
char sFilename[] = "fault.smx";
Handle hPlugin FindPluginByFile(sFilename);
PrintToChatAll("Plugin handle: %i"hPlugin); // returns 0
    // ==============
BuildPath(Path_SMsLogsizeof(sLog), "logs/_status.log");
Handle hIter GetPluginIterator();
Handle hPlug;
char name[64];
// Iterate plugins
while( MorePlugins(hIter) )
hPlug ReadPlugin(hIter);
GetPluginFilename(hPlugnamesizeof name);
ps GetPluginStatus(hPlug);
LogToFileEx(sLog"Plugin %s (Handle: %i) - status: %i"namehPlugps);

// last record of iterator returns Handle: 0
Handle h FindPluginByNumber(52);
PrintToChatAll("52-th plugin handle is: %i"h); // returns 0
return Plugin_Handled;

FindPluginByFile returns 0;
FindPluginByNumber returns 0;

GetPluginIterator + MorePlugins can see disabled plugin. They returns in total 52 records, but that last record is:
Plugin XXX (Handle: 0)
so no information about name of disabled plugin cannot be retrieved from this handle.
Expert of CMD/VBS/VB6. Malware analyst. L4D1 fun (Bloody Witch)
[My plugins] [My tools] [GitHub] [Articles]
Dragokas is offline

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -4. The time now is 13:16.

Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode