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

Both sides previous revisionPrevious revision
Next revision
Previous revision
luaapi:px_core [28/10/2012 00:02] 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 ^
Line 10: Line 10:
 |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.|
 | | | | | |
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.|
Line 55: Line 55:
 |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.|
 | | | | | |
Line 61: Line 61:
 |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.1351382572.txt.gz · Last modified: 28/10/2012 00:02 by ppk