All pastes #82881 Raw Edit

Miscellany

public lua v1 · immutable
·published 2006-07-09 01:21 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 = 'group',    name = "Channels",    desc = "Set channels.",    args = {	chan = {		type = 'group',		name = "Channel One",		desc = "Set Channels",		args = {			one = {				type = 'text',				name = "Channel One",				desc = "Set Channel One",				usage = "<channel>",				get = function()					return ChannelKeys.db.profile.ChanOne				end,				set = function(ChanOne)					ChannelKeys.db.profile.ChanOne = ChanOne				end,					validate = function(ChanOne)					return string.find(name, "^%w+$")				end,				},			two = {				type = 'text',				name = "Channel Two",				desc = "Set Channel Two.",				usage = "<channel>",				get = function()					return ChannelKeys.db.profile.ChanTwo				end,				set = function(ChanTwo)					ChannelKeys.db.profile.ChanOne = ChanTwo				end,					validate = function(ChanTwo)					return string.find(name, "^%w+$")				end,				},			three = {				type = 'text',				name = "Channel Three",				desc = "Set Channel Three.",				usage = "<channel>",				get = function()					return ChannelKeys.db.profile.ChanThree				end,				set = function(ChanThree)					ChannelKeys.db.profile.ChanThree = ChanThree				end,					validate = function(ChanThree)					return string.find(name, "^%w+$")				end,				},			four = {				type = 'text',				name = "Channel Four",				desc = "Set Channel Four.",				usage = "<channel>",				get = function()					return ChannelKeys.db.profile.ChanFour				end,				set = function(ChanFour)					ChannelKeys.db.profile.ChanFour = ChanFour				end,					validate = function(ChanFour)					return string.find(name, "^%w+$")				end,				},			five = {				type = 'text',				name = "Channel Five",				desc = "Set Channel Five.",				usage = "<channel>",				get = function()					return ChannelKeys.db.profile.ChanFive				end,				set = function(ChanFive)					ChannelKeys.db.profile.ChanFive = ChanFive				end,					validate = function(ChanFive)					return string.find(name, "^%w+$")				end,				},							}		}	}})