world.DeleteAliasGroup

MUSHclient script function (Method) — introduced in version 3.29

Deletes a group of aliases

Prototype

long DeleteAliasGroup(BSTR GroupName);

Data type meanings

Description

Triggers, aliases and timers can be placed in "groups" where a group is a bunch of related items. Groups have names, there is no restriction on the name of a group. Ungrouped items have blank (empty) names.

To delete an entire group of aliases do this:

world.DeleteAliasGroup "groupname"

For debugging purposes the function returns a count of the number of members deleted. eg.

dim mycount
mycount = world.DeleteAliasGroup ("groupname")

If you are using plugins only the members of the current plugin (if any) are deleted. If the call is made outside a plugin only the members of the group that are not in a plugin are deleted.

WARNING - if the alias is executing a script it cannot be deleted. For example, an alias cannot delete itself.

If you need to delete an alias from within itself use DoAfterSpecial to delete it after a short delay. You might also want to use EnableAliasGroup to disable it first.

Since DeleteAliasGroup deletes multiple aliases, any found to be "in use" (that is, executing a script) will not be deleted.

VBscript example

world.DeleteAliasGroup "groupname"

Jscript example

world.DeleteAliasGroup ("groupname");

PerlScript example

$world->DeleteAliasGroup ("groupname");

Python example

world.DeleteAliasGroup ("groupname")

Lua example

DeleteAliasGroup ("groupname")

Return value

A count of the number of items deleted.

Related topic

Aliases

See also

FunctionDescription
DeleteAliasDeletes an alias
DeleteGroupDeletes a group of triggers, aliases and timers
DeleteTimerGroupDeletes a group of timers
DeleteTriggerGroupDeletes a group of triggers
DoAfterSpecialAdds a one-shot, temporary, timer to carry out some special action
EnableAliasGroupEnables/disables a group of aliases
EnableGroupEnables/disables a group of triggers, aliases and timers
EnableTimerGroupEnables/disables a group of timers
EnableTriggerGroupEnables/disables a group of triggers
GetAliasInfoGets details about an alias
GetTimerInfoGets details about a timer
GetTriggerInfoGets details about a named trigger