PtokaX wiki

Hub (server) for Direct Connect

User Tools

Site Tools


luaapi:px_setman

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
luaapi:px_setman [14/10/2012 04:06] – created ppkluaapi:px_setman [28/10/2012 00:03] ppk
Line 1: Line 1:
-====== Setting manager functions ======+====== Setting manager metatable functions ======
  
 ^ Function ^ Description ^ ^ Function ^ Description ^
 |SetMan.Save() | Save settings.| |SetMan.Save() | Save settings.|
- +| | |
----- +
 |SetMan.GetMOTD() | Return actual MOTD.| |SetMan.GetMOTD() | Return actual MOTD.|
 |SetMan.SetMOTD(sString) | Set MOTD. <html>|</html> is not allowed.| |SetMan.SetMOTD(sString) | Set MOTD. <html>|</html> is not allowed.|
- +| | |
----- +
 |SetMan.GetBool([[luaapi:setting_bools_ids|nBoolId]]) | Return true or nil for given identificator.| |SetMan.GetBool([[luaapi:setting_bools_ids|nBoolId]]) | Return true or nil for given identificator.|
 |SetMan.SetBool([[luaapi:setting_bools_ids|nBoolId]], bBoolean) | Set boolean value for given identificator.| |SetMan.SetBool([[luaapi:setting_bools_ids|nBoolId]], bBoolean) | Set boolean value for given identificator.|
- +| | |
----- +
 |SetMan.GetNumber([[luaapi:setting_numbers_ids|nNumberId]]) | Return value for given identificator.| |SetMan.GetNumber([[luaapi:setting_numbers_ids|nNumberId]]) | Return value for given identificator.|
 |SetMan.SetNumber([[luaapi:setting_numbers_ids|nNumberId]], nNumber) | Set value for given identificator.| |SetMan.SetNumber([[luaapi:setting_numbers_ids|nNumberId]], nNumber) | Set value for given identificator.|
- +| | |
----- +
 |SetMan.GetString([[luaapi:setting_strings_ids|nStringId]]) | Return string or nil for given identificator.| |SetMan.GetString([[luaapi:setting_strings_ids|nStringId]]) | Return string or nil for given identificator.|
 |SetMan.SetString([[luaapi:setting_strings_ids|nStringId]], sString) | Set string for given identificator.| |SetMan.SetString([[luaapi:setting_strings_ids|nStringId]], sString) | Set string for given identificator.|
- +| | |
----- +
 |SetMan.GetMinShare() | Return min share in bytes.| |SetMan.GetMinShare() | Return min share in bytes.|
 |SetMan.SetMinShare(nShareInBytes) | Set min share in bytes.| |SetMan.SetMinShare(nShareInBytes) | Set min share in bytes.|
 |SetMan.SetMinShare(nMinShare, nShareUnits) | nMinShare max is 9999. nShareUnits 0 = B, 1 = kB, 2 = MB, 3 = GB, 4 = TB| |SetMan.SetMinShare(nMinShare, nShareUnits) | nMinShare max is 9999. nShareUnits 0 = B, 1 = kB, 2 = MB, 3 = GB, 4 = TB|
- +| | |
----- +
 |SetMan.GetMaxShare() | Return max share in bytes.| |SetMan.GetMaxShare() | Return max share in bytes.|
 |SetMan.SetMaxShare(nShareInBytes) | Set max share in bytes.| |SetMan.SetMaxShare(nShareInBytes) | Set max share in bytes.|
 |SetMan.SetMaxShare(nMaxShare, nShareUnits) | nMaxShare max is 9999. nShareUnits 0 = B, 1 = kB, 2 = MB, 3 = GB, 4 = TB| |SetMan.SetMaxShare(nMaxShare, nShareUnits) | nMaxShare max is 9999. nShareUnits 0 = B, 1 = kB, 2 = MB, 3 = GB, 4 = TB|
- +| | |
----- +
 |SetMan.SetHubSlotRatio(nHubs, nSlots) | Set hub/slot ratio.| |SetMan.SetHubSlotRatio(nHubs, nSlots) | Set hub/slot ratio.|
- +| | |
----- +
 |SetMan.GetOpChat() | Return table with sNick, sDescription, sEmail, bEnabled.| |SetMan.GetOpChat() | Return table with sNick, sDescription, sEmail, bEnabled.|
 |SetMan.SetOpChat(bEnabled, sNewOpChatName, sNewDescription, sNewEmail) | Max length of string is 64 chars !!! In nick is not allowed $<html>|</html><>:?*"/\ and space. In Description and Email is not allowed $ and <html>|</html>. Return nil when failed, true when success.| |SetMan.SetOpChat(bEnabled, sNewOpChatName, sNewDescription, sNewEmail) | Max length of string is 64 chars !!! In nick is not allowed $<html>|</html><>:?*"/\ and space. In Description and Email is not allowed $ and <html>|</html>. Return nil when failed, true when success.|
luaapi/px_setman.txt · Last modified: 16/06/2015 14:03 by ppk