[Home] [Downloads] [Search] [Help/forum]

UnloadPlugin

Script function

world.UnloadPlugin

Read about scripting

Type

Method

Summary

Unloads an installed plugin

Prototype

long UnloadPlugin(BSTR PluginID);

View list of data type meanings

Description

Unloads (removes from MUSHclient world space) the specified plugin.

You can specify the plugin by unique ID, or by plugin name (assuming the name is unique in your list of plugins).

eg.

world.ReloadPlugin "chat"
world.ReloadPlugin "753ba7e011f3c8943a885f18"

However, a plugin cannot unload itself. That would mean the script was deleted out from under itself. If you try to work around that by having plugin A call plugin B, and plugin B unloads plugin A, you will probably get a crash. If you really want to make a "unload myself" function in a plugin, use something like DoAfterSpecial, to send the "UnloadPlugin" command to the script engine after a 1-second delay.

The check for plugin name or plugin ID is not case-sensitive.


Available in MUSHclient version 4.73 onwards.



VBscript example

UnloadPlugin "chat"
UnloadPlugin "753ba7e011f3c8943a885f18"


Jscript example

world.UnloadPlugin ("chat");
world.UnloadPlugin ("753ba7e011f3c8943a885f18");


PerlScript example

$world->UnloadPlugin ("chat");
$world->UnloadPlugin ("753ba7e011f3c8943a885f18");


Python example

world.UnloadPlugin ("chat")
world.UnloadPlugin ("753ba7e011f3c8943a885f18")


Lua example

UnloadPlugin ("chat")
UnloadPlugin ("753ba7e011f3c8943a885f18")


Return value

eNoSuchPlugin: Plugin is not currently installed
eBadParameter: Cannot unload ourselves
eOK: Unloaded OK

View list of return code meanings

See Also ...

Topics

Aliases
Arrays
Plugins
Scripting
Timers
Triggers
Variables

Functions

(BroadcastPlugin) Broadcasts a message to all installed plugins
(CallPlugin) Calls a routine in a plugin
(EnablePlugin) Enables or disables the specified plugin
(GetPluginID) Returns the 24-character ID of the current plugin
(GetPluginInfo) Gets details about a specified plugin
(GetPluginList) Gets a list of installed plugins.
(GetPluginName) Returns the name of the current plugin
(GetPluginTimerInfo) Gets details about a named timer for a specified plugin
(GetPluginTimerList) Gets the list of timers in a specified plugin
(GetPluginVariable) Gets the contents of a variable belonging to a plugin
(GetPluginVariableList) Gets the list of variables in a specified plugin
(IsPluginInstalled) Checks to see if a particular plugin is installed
(LoadPlugin) Loads a plugin from disk
(PluginSupports) Checks if a plugin supports a particular routine
(ReloadPlugin) Reloads an installed plugin
(SaveState) Saves the state of the current plugin

(Help topic: function=UnloadPlugin)

Documentation contents page


Search ...

Enter a search string to find matching documentation.

Search for:   

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]