mirror of
https://github.com/arsdragonfly/random_messages.git
synced 2025-01-09 09:20:26 +01:00
fix bugs
This commit is contained in:
parent
50a4134a15
commit
597bfa0e5a
3
init.lua
3
init.lua
@ -11,7 +11,7 @@ math.randomseed(os.time())
|
|||||||
random_messages = {}
|
random_messages = {}
|
||||||
random_messages.messages = {} --This table contains all messages.
|
random_messages.messages = {} --This table contains all messages.
|
||||||
|
|
||||||
function table.Random( t )
|
function table.random( t )
|
||||||
local rk = math.random( 1, table.Count( t ) )
|
local rk = math.random( 1, table.Count( t ) )
|
||||||
local i = 1
|
local i = 1
|
||||||
for k, v in pairs( t ) do
|
for k, v in pairs( t ) do
|
||||||
@ -107,6 +107,7 @@ end)
|
|||||||
|
|
||||||
local register_chatcommand_table = {
|
local register_chatcommand_table = {
|
||||||
params = "viewmessages | removemessage <number> | addmessage <number>",
|
params = "viewmessages | removemessage <number> | addmessage <number>",
|
||||||
|
privs = {server = true},
|
||||||
description = "View and/or alter the server's random messages",
|
description = "View and/or alter the server's random messages",
|
||||||
func = function(name,param)
|
func = function(name,param)
|
||||||
local t = string.split(param, " ")
|
local t = string.split(param, " ")
|
||||||
|
Loading…
Reference in New Issue
Block a user