All pastes #82842 Raw Edit

Miscellany

public text v1 · immutable
·published 2006-07-09 00:09 UTC
rendered paste body
ChannelKeys = AceLibrary("AceAddon-2.0"):new("AceDB-2.0","AceConsole-2.0")
ChannelKeys:RegisterDB("ChannelKeysDB", "ChannelKeysDBPerChar")
ChannelKeys:RegisterChatCommand({ "/channelkeys", "/ck" }, {
    type = 'text',
    name = "Name",
    desc = "Set your name",
    usage = "<name>",
    get = function()
        return ChannelKeys.myName
    end,
    set = function(name)
        ChannelKeys.myName = name
    end,
    validate = function(name)
        return string.find(name, "^%w+$")
    end
})