-- code board V2.1 by plop -- made for my own hub to seperate chat from code -- doesn't repeat to the sender anymore -- added away filter -- added confirmation about sending the code Bot = "Code_Board" tUsers = {} function Main() frmHub:RegBot(Bot) end function DataArrival(user, data) if tUsers[user.sName] == nil then tUsers[user.sName] = 1 end if(strsub(data, 1, 4) == "$To:") then local s,e,whoTo = strfind(data,"$To:%s+(%S+)") if whoTo == Bot then data=strsub(data,1,strlen(data)-1) local s,e,text = strfind(data, "%$%b<>(.*)") if text ~= "" then local s,e,awayvip = strfind(text, "(%b<>)%s*$") if awayvip ~= nil then s,e,awayvip = strfind(awayvip, "(DC)") end if awayvip == nil then---- local curUser local line = "\r\nCode by: "..user.sName.."\r\n"..date().."\r\n--------------------------------------------------------------------------------------------------------------------------------\r\n" line = line..text.."\r\n--------------------------------------------------------------------------------------------------------------------------------\r\n|" for a,b in tUsers do curUser = GetItemByName(a) if curUser and (a ~= user.sName) then curUser:SendPM(Bot, line) elseif a == user.sName then user:SendPM(Bot, "Your code has been send!|") else tUsers[a] = nil end end end end end end end function OpConnected(user) if tUsers[user.sName] == nil then tUsers[user.sName] = 1 end end NewUserConnected = OpConnected function OpDisconnected(user) if tUsers[user.sName] then tUsers[user.sName] = nil end end UserDisconnected = OpDisconnected