summaryrefslogtreecommitdiff
path: root/src/chat.h
Commit message (Expand)AuthorAge
* Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl2013-08-14
* Fix nick completionPilzAdam2013-04-05
* Migrate to STL containers/algorithms.Ilya Zhuravlev2013-03-11
* Update Copyright YearsSfan52013-02-24
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
* Optimize headersPerttu Ahola2012-06-17
* Switch the license to be LGPLv2/later, with small parts still remaining as GP...Perttu Ahola2012-06-05
* Chat console, including a number of rebases and modifications.Kahrl2012-03-10
">) if not ringbufs[tid] then ringbufs[tid]={} ringbufcnt[tid]=0 end ringbufs[tid][ringbufcnt[tid]]=msg ringbufcnt[tid]=ringbufcnt[tid]+1 if ringbufcnt[tid] > ringbuflen then ringbufcnt[tid]=0 end end function advtrains.drb_dump(tid) atdebug("Debug ring buffer output for '"..tid.."':") local stopcnt=ringbufcnt[tid] if not stopcnt then atdebug("ID unknown!") return end repeat atdebug(ringbufs[tid][ringbufcnt[tid]]) ringbufcnt[tid]=ringbufcnt[tid]+1 if ringbufcnt[tid] > ringbuflen then ringbufcnt[tid]=0 end until ringbufcnt[tid]==stopcnt end minetest.register_chatcommand("atdebug_show", { params = "train sid", -- Short parameter description description = "Dump debug log", -- Full description privs = {train_operator=true}, -- Require the "privs" privilege to run func = function(name, param) advtrains.drb_dump(param) end, -- Called when command is run. -- Returns boolean success and text output. })