diff Libs/AceComm-3.0/AceComm-3.0.lua @ 58:0682d738499b v8.0.1.058

- 8.0.1 Update.
author Tercio
date Fri, 20 Jul 2018 19:04:12 -0300
parents dbf04157d63e
children
line wrap: on
line diff
--- a/Libs/AceComm-3.0/AceComm-3.0.lua	Sun Mar 11 10:50:42 2018 -0300
+++ b/Libs/AceComm-3.0/AceComm-3.0.lua	Fri Jul 20 19:04:12 2018 -0300
@@ -9,7 +9,7 @@
 -- make into AceComm.
 -- @class file
 -- @name AceComm-3.0
--- @release $Id: AceComm-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $
+-- @release $Id: AceComm-3.0.lua 1174 2018-05-14 17:29:49Z h.leppkes@gmail.com $
 
 --[[ AceComm-3.0
 
@@ -20,7 +20,7 @@
 local CallbackHandler = LibStub("CallbackHandler-1.0")
 local CTL = assert(ChatThrottleLib, "AceComm-3.0 requires ChatThrottleLib")
 
-local MAJOR, MINOR = "AceComm-3.0", 10
+local MAJOR, MINOR = "AceComm-3.0", 12
 local AceComm,oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
 if not AceComm then return end
@@ -65,7 +65,11 @@
 	if #prefix > 16 then -- TODO: 15?
 		error("AceComm:RegisterComm(prefix,method): prefix length is limited to 16 characters")
 	end
-	RegisterAddonMessagePrefix(prefix)
+	if C_ChatInfo then
+		C_ChatInfo.RegisterAddonMessagePrefix(prefix)
+	else
+		RegisterAddonMessagePrefix(prefix)
+	end
 
 	return AceComm._RegisterComm(self, prefix, method)	-- created by CallbackHandler
 end
@@ -85,7 +89,7 @@
 	if not( type(prefix)=="string" and
 			type(text)=="string" and
 			type(distribution)=="string" and
-			(target==nil or type(target)=="string") and
+			(target==nil or type(target)=="string" or type(target)=="number") and
 			(prio=="BULK" or prio=="NORMAL" or prio=="ALERT") 
 		) then
 		error('Usage: SendCommMessage(addon, "prefix", "text", "distribution"[, "target"[, "prio"[, callbackFn, callbackarg]]])', 2)