• Warhammer Online Addons
Advertisement
  • Warhammer Online
  • Average Rating:

  • Your Rating

  • Share
  • Report Abuse

LibSlash

  Download the Curse Client

Project Updated:
Files Updated: Mon, Nov 10 2008
Category: Development Tools
Tags:

, , and [Edit Tags]

Project Manager: Aiiane
Current Version: v2.4-release
Downloads Today: 953
Downloads Total: 140,430
Favorites: 0
Comments: 109
  • About LibSlash
  •  

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.

With LibSlash installed, you'll also be able to use /addon or /uimod to open the Addons window in-game.


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:

<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:

LibSlash.RegisterSlashCmd("myslash", function(input) MyAddonHandleSlash(input) end)

The single argument passed to the handler is a string containing 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.

Alternatively, LibSlash.RegisterWSlashCommand() can be used to register a handler to receive a wstring version of the chat line, instead of having it automatically translated to a string.

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.

  • Downloads (7)
  •  
File Name Release Type Game Version Downloads Date
Addon Curse.com Beta 2.3.3 0 9/29/2008
  File Name Release Type Game Version Downloads Date  
  LibSlash v2.4-release Release Beta 3.0 17,866 11/10/2008
  LibSlash v2.3-release Release Beta 3.0 45,008 10/12/2008
  LibSlash v2.2-release Release Beta 3.0 20,574 10/6/2008
  LibSlash v2.1-release Release Beta 3.0 17,131 10/2/2008
  LibSlash v2.0-release Release Beta 3.0 3,349 9/28/2008
Advertisement
  • Comments

Add Comment

Add

You need to login or register to post.

Benefits of Registration

  • Interact with hundreds of thousands of other gamers on an open social network.
  • Post your stories, news, images, videos, and other content to share.
  • Create a network with your fellow gamers or join an existing one.
  • Gain reputation for everything you do.
  • locknor said 

    well since my last crash to desctop, libslash seem to be not working anymore, the commands /addon simply dont work and nothing helped, I installed it new and did everything but it just dont work.

    Reply Permalink
  • Anch said 

    same problem here... with libslash (and only libslash) in my addon folder i can't move anything in my bagpack. right-click works fine and items are usuable but no movement with left-click.

    Reply Permalink
  • varhamir said 

    It seems this library need an update with the last WAR patches.

    Reply Permalink
  • Aiiane said 

    Er? It works fine.

    Reply Permalink
  • Hello,

    I am seeing a new issue after the recent patch. I have removed all Addons except LibSlash. When I enable LibSlash I am unable to select or move items in the backpack. When I disable LibSlash I can move items in and out of my backpack again. Ideas?

    Thanks

    Reply Permalink
  • Aiiane said 

    You probably didn't actually disable/remove all of your addons. LibSlash does absolutely nothing that deals with the backback, but if you have an addon that uses LibSlash and *does* deal with the backpack, disabling LibSlash might disable that addon, making it "look" like LibSlash is what's doing it. Check your /addon list to see what addons are really loaded.

    Reply Permalink
  • Did that.

    I removed all addons, cleared all cache data, all user data. Reset everything to defaults. I basically had an out of the box install at this point. Unless I am missing a data directory somewhere. Meh, I will work around it by turning it off and on as needed I guess.

    Reply Permalink
  • Vand said 

    Check that you have the most current Auction Stats and do NOT have Auction Assist. Auction Assist functionality was merged into Auction Stats so it is no longer needed on it's own, and will create this same bag problem if you have them both. I haven't had the bag problem since I did this.

    Reply Permalink
  • Nemes said 

    Afternoon Aiiane

    Are there any plans to LibStub this library?

    I'm a fan of embedding addons (see NLootLink) and would like to be able to embed a specific version. In the event of LibSlash API changes, LibStub would allow multiple versions to be loaded and have addons that use the old API to still function.

    Reply Permalink
  • Aiiane said 

    At some point, possibly yes. (Psst - I was the one who ported LibStub over to WAR, I know what its advantages are. ;)

    Reply Permalink
  • Nemes said 

    I know... you're the one who made it work :-)

    So... next "version" i.e. different API will be LibStub? In that case, I'm safe to embed the current LibSlash, knowing that the next one will be LibStub only.

    Reply Permalink
  • Aiiane said 

    It'd be better not to embed it until it's LibStub'd, given that I don't know exactly when I'm going to LibStub it, and if for some reason a bug is found that I want to fix right away, you wouldn't want to accidentally prevent people from being able to use that bugfix.

    Reply Permalink
  • Nemes said 

    All good.

    Any libraries that are LibStub'd will be embedded, any that aren't will be specified as dependencies in .pkgmeta.

    Reply Permalink
  • Lutgarda said 

    Hi :)

    For italian language:

    http://www.fileshost.com/en/file/66967/Translations-lua.html

    Reply Permalink
  • Lutgarda said 

    Sorry wrong window ><'

    Reply Permalink
  • inia said 

    is there any script or command to ask libslash to print (on the screen or in the chat) the list of command registered from the varius addons to it ???
    it was wonderful if we can havee so a list of various command if we forget someone.
    it was best if we can filter the search also by capital letter :)

    Reply Permalink
  • Aiiane said 

    If you really want to see, you can do this:

    /debug
    (Make sure it says Logs (On), if it says (Off) click it on)
    /s