Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function demonnic.chat:append(chat)
- local r = demonnic.chat.config.windowColors.r
- local g = demonnic.chat.config.windowColors.g
- local b = demonnic.chat.config.windowColors.b
- selectCurrentLine()
- local ofr,ofg,ofb = getFgColor()
- local obr,obg,obb = getBgColor()
- if demonnic.chat.config.preserveBackground then
- setBgColor(r,g,b)
- end
- copy()
- local curLine = getCurrentLine()
- if demonnic.chat.config.timestamp then
- local timestamp = getTime(true, demonnic.chat.config.timestamp)
- local tsfg = {}
- local tsbg = {}
- local colorLeader = ""
- if demonnic.chat.config.timestampCustomColor then
- if type(demonnic.chat.config.timestampFG) == "string" then
- tsfg = color_table[demonnic.chat.config.timestampFG]
- else
- tsfg = demonnic.chat.config.timestampFG
- end
- if type(demonnic.chat.config.timestampBG) == "string" then
- tsbg = color_table[demonnic.chat.config.timestampBG]
- else
- tsbg = demonnic.chat.config.timestampBG
- end
- colorLeader = string.format("<%s,%s,%s:%s,%s,%s>",tsfg[1],tsfg[2],tsfg[3],tsbg[1],tsbg[2],tsbg[3])
- else
- colorLeader = string.format("<%s,%s,%s:%s,%s,%s>",ofr,ofg,ofb,obr,obg,obb)
- end
- local fullstamp = string.format("%s%s",colorLeader,timestamp)
- demonnic.chat.windows[chat]:decho(fullstamp)
- demonnic.chat.windows[chat]:echo(" ")
- demonnic.chat.windows[chat]:decho(string.format("<%s,%s,%s:%s,%s,%s>",ofr,ofg,ofb,obr,obg,obb) .. curLine .. "\n")
- if demonnic.chat.config.Alltab then
- demonnic.chat.windows[demonnic.chat.config.Alltab]:decho(fullstamp)
- demonnic.chat.windows[demonnic.chat.config.Alltab]:echo(" ")
- demonnic.chat.windows[demonnic.chat.config.Alltab]:decho(string.format("<%s,%s,%s:%s,%s,%s>",ofr,ofg,ofb,obr,obg,obb) .. curLine .. "\n")
- end
- end
- --demonnic.chat.windows[chat]:append()
- if demonnic.chat.config.gag then
- deleteLine()
- tempLineTrigger(1,1, [[if isPrompt() then deleteLine() end]])
- end
- if demonnic.chat.config.Alltab then
- --appendBuffer(string.format("win%s", demonnic.chat.config.Alltab))
- end
- if demonnic.chat.config.blink and chat ~= demonnic.chat.currentTab then
- if (demonnic.chat.config.Alltab == demonnic.chat.currentTab) and not demonnic.chat.config.blinkOnAll then
- return
- else
- demonnic.chat.tabsToBlink[chat] = true
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment