PtokaX wiki

Hub (server) for Direct Connect

User Tools

Site Tools


luaapi:px_core

Differences

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

Link to this comparison view

Next revision
Previous revision
luaapi:px_core [14/10/2012 03:50] – created ppkluaapi:px_core [09/01/2016 15:14] (current) – Reg bot dissalowed characters correction. ppk
Line 1: Line 1:
-====== Core metatable functions ======+====== Core table functions ======
  
 ^ Function ^ Description ^ ^ Function ^ Description ^
 |Core.Version | Return PtokaX version.| |Core.Version | Return PtokaX version.|
 |Core.BuildNumber | Return PtokaX build number.| |Core.BuildNumber | Return PtokaX build number.|
-----+| | |
 |Core.Restart() | Restart hub.| |Core.Restart() | Restart hub.|
 |Core.Shutdown() | Shutdown hub.| |Core.Shutdown() | Shutdown hub.|
-----+| | |
 |Core.ResumeAccepts() | Resume listening thread(s) if they were suspended.| |Core.ResumeAccepts() | Resume listening thread(s) if they were suspended.|
 |Core.SuspendAccepts() | Stop listening thread(s). Hub looks in this time like it is not running.| |Core.SuspendAccepts() | Stop listening thread(s). Hub looks in this time like it is not running.|
-|Core.SuspendAccepts(nTime) | Stop listening thread(s) for given time in seconds. Hub looks in this time like it is not running.| +|Core.SuspendAccepts(iTime) | Stop listening thread(s) for given time in seconds. Hub looks in this time like it is not running.| 
----- +| | | 
-|Core.RegBot(sBotName, sDescription, sEmail, bHaveKey) | Chars $<html>|</html><>:?*"/and space not allowed in nick$<html>|</html> not allowed in Description and Email, max length 64 chars per string. Return nil when failed, true when success.|+|Core.RegBot(sBotName, sDescription, sEmail, bHaveKey) | Chars $<html>|</html> and space not allowed in nick$<html>|</html> not allowed in Description and Email, max length 64 chars per string. Return nil when failed, true when success.|
 |Core.UnregBot(sBotName) | Return nil when failed, true when success.| |Core.UnregBot(sBotName) | Return nil when failed, true when success.|
-----+| | |
 |Core.GetBots() | Return table with all bots registered by scripts as tables with sNick, sMyINFO, bIsOP and sScriptName.| |Core.GetBots() | Return table with all bots registered by scripts as tables with sNick, sMyINFO, bIsOP and sScriptName.|
 |Core.GetActualUsersPeak() | Return actual users peak.| |Core.GetActualUsersPeak() | Return actual users peak.|
Line 33: Line 33:
 |Core.GetOnlineUsers() | Return table with all logged [[luaapi:user_table|user table]]s.| |Core.GetOnlineUsers() | Return table with all logged [[luaapi:user_table|user table]]s.|
 |Core.GetOnlineUsers(bAllData) | Return table with all logged [[luaapi:user_table|user table]]s. Use true for bAllData if you want [[luaapi:user_table|user table]]s with all data.| |Core.GetOnlineUsers(bAllData) | Return table with all logged [[luaapi:user_table|user table]]s. Use true for bAllData if you want [[luaapi:user_table|user table]]s with all data.|
-|Core.GetOnlineUsers(nProfileNumber) | Return table with users of given profile.| +|Core.GetOnlineUsers(iProfileNumber) | Return table with users of given profile.| 
-|Core.GetOnlineUsers(nProfileNumber, bAllData) | Return table with users of given profile. Use true for bAllData if you want [[luaapi:user_table|user table]]s with all data.|+|Core.GetOnlineUsers(iProfileNumber, bAllData) | Return table with users of given profile. Use true for bAllData if you want [[luaapi:user_table|user table]]s with all data.|
 |Core.GetUser(sNick) | Return online user of given nick as [[luaapi:user_table|user table]] or nil when user not exist.| |Core.GetUser(sNick) | Return online user of given nick as [[luaapi:user_table|user table]] or nil when user not exist.|
-|Core.GeUser(sNick, bAllData) | Return online user of given nick as [[luaapi:user_table|user table]] or nil when user not exist. Use true for bAllData if you want [[luaapi:user_table|user table]] with all data.| +|Core.GetUser(sNick, bAllData) | Return online user of given nick as [[luaapi:user_table|user table]] or nil when user not exist. Use true for bAllData if you want [[luaapi:user_table|user table]] with all data.| 
-|Core.GeUserAllData([[luaapi:user_table|tUser]]) | Add or update all user data in [[luaapi:user_table|user table]]. Return nil when failed (user is not online) or true when sucess.| +|Core.GetUserAllData([[luaapi:user_table|tUser]]) | Add or update all user data in [[luaapi:user_table|user table]]. Return nil when failed (user is not online) or true when sucess.| 
-|Core.GeUserData([[luaapi:user_table|tUser]], [[luaapi:user_data_ids|nValueId]]) | Add or update value of given id in [[luaapi:user_table|user table]]. Return nil when failed (user is not online) or true when sucess.| +|Core.GetUserData([[luaapi:user_table|tUser]], [[luaapi:user_data_ids|iValueId]]) | Add or update value of given id in [[luaapi:user_table|user table]]. Return nil when failed (user is not online) or true when sucess.| 
-|Core.GeUserValue([[luaapi:user_table|tUser]], [[luaapi:user_data_ids|nValueId]]) | Return value of wanted nValueId or nil when failed (user is not online).| +|Core.GetUserValue([[luaapi:user_table|tUser]], [[luaapi:user_data_ids|iValueId]]) | Return value of wanted iValueId or nil when failed (user is not online).| 
-|GeUsers(sIP) | Return online users from given ip as table with [[luaapi:user_table|user table]]s or nil when no user with that IP is found or invalid IP is given.| +|Core.GetUsers(sIP) | Return online users from given ip as table with [[luaapi:user_table|user table]]s or nil when no user with that IP is found or invalid IP is given.| 
-|GeUsers(sIP, bAllData) | Return online users from given ip as table with [[luaapi:user_table|user table]]s or nil when no user with that IP is found or invalid IP is given. Use true for bAllData if you want [[luaapi:user_table|user table]] with all data.| +|Core.GetUsers(sIP, bAllData) | Return online users from given ip as table with [[luaapi:user_table|user table]]s or nil when no user with that IP is found or invalid IP is given. Use true for bAllData if you want [[luaapi:user_table|user table]] with all data.| 
-----+| | |
 |Core.Disconnect(sNick) | Disconnect user with given nick. Return nil when failed, true when success.| |Core.Disconnect(sNick) | Disconnect user with given nick. Return nil when failed, true when success.|
 |Core.Disconnect([[luaapi:user_table|tUser]]) | Disconnect user. Return nil when failed, true when success.| |Core.Disconnect([[luaapi:user_table|tUser]]) | Disconnect user. Return nil when failed, true when success.|
-----+| | |
 |Core.Kick([[luaapi:user_table|tUser]], sKickerNick, sReason) | Kick user. Max KickerNick length 64 chars, max Reason length 128000 chars. Return nil when failed, true when success.| |Core.Kick([[luaapi:user_table|tUser]], sKickerNick, sReason) | Kick user. Max KickerNick length 64 chars, max Reason length 128000 chars. Return nil when failed, true when success.|
 |Core.Redirect([[luaapi:user_table|tUser]], sAddress, sReason) | Redirect user to given address with given reason. Max Address length 1024 chars. Max Reason length 128000 chars. Return nil when failed, true when success.| |Core.Redirect([[luaapi:user_table|tUser]], sAddress, sReason) | Redirect user to given address with given reason. Max Address length 1024 chars. Max Reason length 128000 chars. Return nil when failed, true when success.|
-----+| | |
 |Core.DefloodWarn([[luaapi:user_table|tUser]]) | Warn user on flood. Return nil when failed, true when success.| |Core.DefloodWarn([[luaapi:user_table|tUser]]) | Warn user on flood. Return nil when failed, true when success.|
-----+| | |
 |Core.SendToAll(sData) | Send data to all users. Max sData length 128000 chars. When data don't contains <html>|</html> on end, will be automatically added.| |Core.SendToAll(sData) | Send data to all users. Max sData length 128000 chars. When data don't contains <html>|</html> on end, will be automatically added.|
 |Core.SendToNick(sNick, sData) | Send data to user with given nick. Max sData length 128000 chars. When data don't contains <html>|</html> on end, will be automatically added.| |Core.SendToNick(sNick, sData) | Send data to user with given nick. Max sData length 128000 chars. When data don't contains <html>|</html> on end, will be automatically added.|
 |Core.SendToOpChat(sData) | Send data as private message in OpChat. Max sData length 128000 chars. If OpChat is not enabled then nothing is sent.| |Core.SendToOpChat(sData) | Send data as private message in OpChat. Max sData length 128000 chars. If OpChat is not enabled then nothing is sent.|
 |Core.SendToOps(sData) | Send data to operators. Max sData length 128000 chars. When data don't contains <html>|</html> on end, will be automatically added.| |Core.SendToOps(sData) | Send data to operators. Max sData length 128000 chars. When data don't contains <html>|</html> on end, will be automatically added.|
-|Core.SendToProfile(nProfileNumber, sData) | Send data to users with given profile. Max sData length 128000 chars. When data don't contains <html>|</html> on end, will be automatically added.|+|Core.SendToProfile(iProfileNumber, sData) | Send data to users with given profile. Max sData length 128000 chars. When data don't contains <html>|</html> on end, will be automatically added.|
 |Core.SendToUser([[luaapi:user_table|tUser]], sData) | Send data to user. Max Data length 128000 chars. When data don't contains <html>|</html> on end, will be automatically added.| |Core.SendToUser([[luaapi:user_table|tUser]], sData) | Send data to user. Max Data length 128000 chars. When data don't contains <html>|</html> on end, will be automatically added.|
-----+| | |
 |Core.SendPmToAll(sFromNick, sData) | Send data as private message to all users. Max FromNick length 64 chars, max Data length 128000 chars.| |Core.SendPmToAll(sFromNick, sData) | Send data as private message to all users. Max FromNick length 64 chars, max Data length 128000 chars.|
 |Core.SendPmToNick(sToNick, sFromNick, sData) | Send data as private message to user with given nick. Max FromNick length 64 chars, max Data length 128000 chars.| |Core.SendPmToNick(sToNick, sFromNick, sData) | Send data as private message to user with given nick. Max FromNick length 64 chars, max Data length 128000 chars.|
 |Core.SendPmToOps(sFromNick, sData) | Send data to operators. Max FromNick length 64 chars, max Data length 128000 chars.| |Core.SendPmToOps(sFromNick, sData) | Send data to operators. Max FromNick length 64 chars, max Data length 128000 chars.|
-|Core.SendPmToProfile(nProfileNumber, sFromNick, sData) | Send data as private message to users with given profile. Max FromNick length 64 chars, max Data length 128000 chars.|+|Core.SendPmToProfile(iProfileNumber, sFromNick, sData) | Send data as private message to users with given profile. Max FromNick length 64 chars, max Data length 128000 chars.|
 |Core.SendPmToUser([[luaapi:user_table|tUser]], sFromNick, sData) | Send private message to user. Max FromNick length 64 chars, max Data length 128000 chars.| |Core.SendPmToUser([[luaapi:user_table|tUser]], sFromNick, sData) | Send private message to user. Max FromNick length 64 chars, max Data length 128000 chars.|
----- +| | | 
-|Core.SetUserInfo([[luaapi:user_table|tUser]], [[luaapi:user_info_ids|nValueId]], nil/sValue/nValue, bPermanent) | Set user info in MyINFO. Max sValue lenght 64 chars, $ and <html>|</html> is not allowed. Use bPermanent when you want to apply change permanently.|+|Core.SetUserInfo([[luaapi:user_table|tUser]], [[luaapi:user_info_ids|iValueId]], nil/sValue/iValue, bPermanent) | Set user info in MyINFO. Max sValue lenght 64 chars, $ and <html>|</html> is not allowed. Use bPermanent when you want to apply change permanently.|
luaapi/px_core.1350186636.txt.gz · Last modified: 14/10/2012 03:50 by ppk