I'm working to a Bot and is me found in a situation too complex for me: D
I want to create a comand "! set" to set what levels of users could use a certain comand. !set .
Ovviamente if I set that the order could use the user of level 3, it means that all the user of level 3, more, the user of a superior level, could use the comand.
Please help me :(
Hi,
It?s possible to do but you have to do a lot of code, for example you have to define what profile matches with level 3, unless you are using the number of the profile.dat, second you have to creat a file where the command set will send the level to the commands, then in all commands that can been changed by set you have to put some code to get from the file where do you have all levels set to commands to when is called to check if the user that is trying to access is accept or not..
Good luck on that..
Best regards, nErBoS
Also I had thought about behavior a similar thing. But my problem is that I don't know the string that allows me to read a precise line into a file.
For example i doesn't succeed this:
file setting.ini if you open it you find this list:
flood = 4
sethubname = 1
setmaxslot = 1
ban = 4
kick = 5
....
..
file Bot.lua.... What must I write inside in this file to read a precise line to file setting.ini??
To read i use this code:
function ReadLine(user)
readfrom("files/setting.ini")
while 1 do
local line = read()
if line == nil then
break
else
SendData(Bot, line)
end
end
readfrom()
end
But to read a line in this file, what code must i use?