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

MUSHclient scripting

Description of MUSHclient world function: world.ReloadPlugin

Name ReloadPlugin
Type Method
Summary Reloads an installed plugin
Prototype long ReloadPlugin(BSTR PluginID);

View list of data type meanings


This is designed to help plugin writers quickly reload a plugin they are testing. You can specify the plugin by unique ID, or by plugin name (assuming the name is unique in your list of plugins).


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

However, a plugin cannot reload 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 reloads plugin A, you will probably get a crash. If you really want to make a "reload myself" function in a plugin, use something like DoAfterSpecial, to send the "ReloadPlugin" command to the script engine after a 1-second delay.

The intention here is for plugin authors to make an alias that they can type when they want to retest their plugin.

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

Note: Available in version 3.50 onwards.

VBscript example
world.ReloadPlugin "chat"
world.ReloadPlugin "753ba7e011f3c8943a885f18"
Jscript example
world.ReloadPlugin ("chat");
world.ReloadPlugin ("753ba7e011f3c8943a885f18");
PerlScript example
$world->ReloadPlugin ("chat");
$world->ReloadPlugin ("753ba7e011f3c8943a885f18");
Python example
world.ReloadPlugin ("chat")
world.ReloadPlugin ("753ba7e011f3c8943a885f18")
Lua example
ReloadPlugin ("chat")
ReloadPlugin ("753ba7e011f3c8943a885f18")
Returns eNoSuchPlugin: Plugin is not currently installed
eBadParameter: Cannot reload ourselves
ePluginFileNotFound: Plugin file not found
eProblemsLoadingPlugin: Parsing or other problem in plugin file - see error window
eOK: Loaded OK

View list of return code meanings

Introduced in version 3.50

See also ...

Function Description
GetPluginInfo Gets details about a specified plugin
GetPluginList Gets a list of installed plugins.
IsPluginInstalled Checks to see if a particular plugin is installed
LoadPlugin Loads a plugin from disk
UnloadPlugin Unloads an installed plugin

Search for script function

Enter a word or phrase in the box below to narrow the list down to those that match.

The function name, prototype, summary, and description are searched.

Search for:   

Leave blank to show all functions.

Return codes

Many functions return a "code" which indicates the success or otherwise of the function.

You can view a list of the return codes

Function prototypes

The "prototype" part of each function description lists exactly how the function is called (what arguments, if any, to pass to it).

You can view a list of the data types used in function prototypes

View all functions


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.


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]