Windows (Folder) |- Chat Window |- GMCP Chat Hook |- GMCP enable chatWindows code
win = win or {}Chat Window code
function win.createChat() win.chatparent = Adjustable.Container:new({name="win.chatparent"}) win.chat = Geyser.MiniConsole:new({ name="win.chat", x="0%", y="0%", width="100%", height="100%", autoWrap=true, scrollBar=true, fontSize=12 }, win.chatparent) win.chat:setColor(0,0,0,255) end registerAnonymousEventHandler("sysLoadEvent", "win.createChat")GMCP Chat Hook code
function win.handleCommChannelText() local text = ansi2decho(win.stripMXP(gmcp.Comm.Channel.Text.text)) .. "\n" win.chat:decho(text) end function win.stripMXP(str) return str:gsub("\27%[4z\3.-\4", '') end registerAnonymousEventHandler("gmcp.Comm.Channel.Text", "win.handleCommChannelText")GMCP enable chat code
function win.opencomms() sendGMCP('Core.Supports.Add ["Comm.Channel 1"]') end registerAnonymousEventHandler("gmcp.Char.Name", "win.opencomms")
The pleasure is always mine when my victims commune members enjoy their time with me.Eve said:Thank you @Viravain. You scared the heck out of me before my morning coffee.