1. #1

    Trying to adjust addon to send chat message that can not recorded by /chatlog

    the argument is:
    DEFAULT_CHAT_FRAME:AddMessage(msg, 0, 1, 0)

    However, DEFAULT_CHAT_FRAME is not something that the /chatlog command picks up, needs to report to a channel, whisper myself or something.

    Anyone able to tell me how to change this one line to make it go to specific channel such as #5 (channels are number that get given names but are indexed as number still if i remember correctly)?

  2. #2

  3. #3
    The addon is not mine and my LUA experience is limited to finding solutions for things that really bug me.
    Addon is Guild Check from http://wow.curse.com/downloads/wow-a...ject-3843.aspx

    Best I can tell - this is my only option to make a change since I have successfully changed what frame but need it post to a channel rather then a frame I guess

    The auther defines the reporting here I would guess

    function GuildCheck:Out(msg)
    self: Debug("Out()")
    --ChatFrame6:AddMessage(msg, 0, 1, 0)
    DEFAULT_CHAT_FRAME:AddMessage(msg, 0, 1, 0)
    end

    As you can see I was able to make it report to ChatFrame6 however it is still reporting in a way that is not able to be recorded by /chatlog. Any help on how to fit that linked programming into this would be great. (spent all day getting to the ChatFrame6 thing didn't realize that just changing the frame didn't change how it would be reported)

    The author uses this all over for reporting so I think I am very limited as to how to change the reporting

    elseif change.type == "promote" then
    self:Out(string.format(" %s", string.format(L["was promoted by %s"], change.officer)))
    self:Out(string.format(" %s: %s => %s", L["Rank"], change.old, change.new))

    In this usage the msg is a variable I believe, sorry I such a nub trying to teach myself as I go
    Last edited by CrazieBird; 2011-09-04 at 07:34 PM.

  4. #4
    Deleted
    Code:
    SendChatMessage(msg, "CHANNEL", nil, 5)
    Replace the DEFAULT_CHAT_FRAME part.

  5. #5
    Thank you very much for all the help - I might just go buy a LUA programming book, reminds me of Visual Basic (yeah I know old-school but that was what they had in college for starter programming in 1989 ROFL)

    Works like a charm, now I'll just have to figure out what channel is best for the possible spam LOL

  6. #6
    Oh I didn't know just using the channel index for the 4th argument would also only work .. oh well :|
    Last edited by Ketho; 2011-09-04 at 09:22 PM.

  7. #7
    Deleted
    Your code works because GetChannelName returns the channel number as the first argument. Passing the channel name doesn't work at all.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •