Addon Info.
Optional Files (0)
Archived (3)
Comments (0)
  Category: Libraries
Addon Information
Download Latest Version.
To add favorites please register for a free account. If you already have one you need to login. How do I install this? (FAQ)
Author:
Version:
2.3-release
Date:
10-31-2008 03:29 PM
Size:
3.79 Kb
Downloads:
1,518
Views:
4,610
Favorites:
24
MD5:
LibSlash   Popular!
Rate: 5 out of 5 with 1 votes  
A basic library for registering slash commands in the WAR interface.

If you're downloading this because an addon you want to use requires it, just extract it into the interface\addons directory, and that's all you need to do. It'll also give you access to /addon and /uimod automatically.

--------------

If you're writing an addon and want to utilize LibSlash, place it in the proper addons directory along with your other addons. Then, add it as a dependency in your addon's .mod file, like so:

Code:
<Dependencies>
    <Dependency name="LibSlash" />
</Dependencies>
This will ensure that LibSlash is loaded before your addon, so that its functions will be available for use.

To register a slash command handler, call LibSlash.RegisterSlashCmd() with the slash command you want to register (a string, NOT INCLUDING THE /) and a function to serve as the handler:

Code:
LibSlash.RegisterSlashCmd("myslash", function(input) MyAddonHandleSlash(input) end)
The single argument passed to the handler is the rest of the chat line entered after the initial slash command, so the above code would call MyAddonHandleSlash with an argument of "testing" if I typed "/myslash testing" at the command line. By default, the argument passed is automatically converted to a string; if you desire the original wstring instead, use RegisterWSlashCommand().

To unregister a slash command, use LibSlash.UnregisterSlashCmd("myslash") - the only argument it takes is a string specifying the slash command to unregister. You can also use LibSlash.IsSlashCmdRegistered("myslash") to see if a slash command is already registered, possibly by another addon.

Both the register and unregister functions will return true on success, or false on failure for any reason such as attempting to register a slash command which is already registered, or other silly things.
  Optional Files - LibSlash
Sorry, there are currently no optional files available.
  Archived Versions - LibSlash
File Name
Version
Size
Author
Date
1.9-release
2.75 Kb
Aiiane
09-26-2008 03:28 PM
1.8-release
2.71 Kb
Aiiane
09-26-2008 12:20 PM
1.3-release
2.19 Kb
Aiiane
09-07-2008 07:58 PM
  Comments - LibSlash
There have been no comments posted to this file.
Be the first to add one.



Category Jump:



The Network:
EQInterface | EQ2Interface | LoTROInterface | MMOInterface | War.MMOUI | WoWInterface | VGInterface | Allakhazam | Thottbot | Wowhead | Zam


©2009 MMOUI / ZAM Network
vBulletin - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.