Created
June 24, 2010 01:53
-
-
Save tekkub/450859 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function getnote(fullname) | |
local _, online = BNGetNumFriends() | |
for i=1,online do | |
local _, givenName, surname, _, _, _, _, _, _, _, _, note = BNGetFriendInfo(i) | |
if (givenName.. " ".. surname) == fullname and note and note ~= "" then return note end | |
end | |
return name:gsub(" %w+$", "") | |
end | |
local function bettername(self, event, msg, name, ...) | |
print(event, msg, name, ...) | |
return false, msg, getnote(name), ... | |
end | |
ChatFrame_AddMessageEventFilter("CHAT_MSG_BN_WHISPER", bettername) | |
ChatFrame_AddMessageEventFilter("CHAT_MSG_BN_WHISPER_INFORM", bettername) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment