luaapi:px_core
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
luaapi:px_core [14/10/2012 03:50] – created ppk | luaapi:px_core [09/01/2016 15:14] (current) – Reg bot dissalowed characters correction. ppk | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Core metatable | + | ====== 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, | + | |Core.RegBot(sBotName, |
|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: | |Core.GetOnlineUsers() | Return table with all logged [[luaapi: | ||
|Core.GetOnlineUsers(bAllData) | Return table with all logged [[luaapi: | |Core.GetOnlineUsers(bAllData) | Return table with all logged [[luaapi: | ||
- | |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: | + | |Core.GetOnlineUsers(iProfileNumber, bAllData) | Return table with users of given profile. Use true for bAllData if you want [[luaapi: |
|Core.GetUser(sNick) | Return online user of given nick as [[luaapi: | |Core.GetUser(sNick) | Return online user of given nick as [[luaapi: | ||
- | |Core.GeUser(sNick, bAllData) | Return online user of given nick as [[luaapi: | + | |Core.GetUser(sNick, bAllData) | Return online user of given nick as [[luaapi: |
- | |Core.GeUserAllData([[luaapi: | + | |Core.GetUserAllData([[luaapi: |
- | |Core.GeUserData([[luaapi: | + | |Core.GetUserData([[luaapi: |
- | |Core.GeUserValue([[luaapi: | + | |Core.GetUserValue([[luaapi: |
- | |GeUsers(sIP) | Return online users from given ip as table with [[luaapi: | + | |Core.GetUsers(sIP) | Return online users from given ip as table with [[luaapi: |
- | |GeUsers(sIP, bAllData) | Return online users from given ip as table with [[luaapi: | + | |Core.GetUsers(sIP, bAllData) | Return online users from given ip as table with [[luaapi: |
- | ---- | + | | | | |
|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: | |Core.Disconnect([[luaapi: | ||
- | ---- | + | | | | |
|Core.Kick([[luaapi: | |Core.Kick([[luaapi: | ||
|Core.Redirect([[luaapi: | |Core.Redirect([[luaapi: | ||
- | ---- | + | | | | |
|Core.DefloodWarn([[luaapi: | |Core.DefloodWarn([[luaapi: | ||
- | ---- | + | | | | |
|Core.SendToAll(sData) | Send data to all users. Max sData length 128000 chars. When data don't contains < | |Core.SendToAll(sData) | Send data to all users. Max sData length 128000 chars. When data don't contains < | ||
|Core.SendToNick(sNick, | |Core.SendToNick(sNick, | ||
|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 < | |Core.SendToOps(sData) | Send data to operators. Max sData length 128000 chars. When data don't contains < | ||
- | |Core.SendToProfile(nProfileNumber, sData) | Send data to users with given profile. Max sData length 128000 chars. When data don't contains < | + | |Core.SendToProfile(iProfileNumber, sData) | Send data to users with given profile. Max sData length 128000 chars. When data don't contains < |
|Core.SendToUser([[luaapi: | |Core.SendToUser([[luaapi: | ||
- | ---- | + | | | | |
|Core.SendPmToAll(sFromNick, | |Core.SendPmToAll(sFromNick, | ||
|Core.SendPmToNick(sToNick, | |Core.SendPmToNick(sToNick, | ||
|Core.SendPmToOps(sFromNick, | |Core.SendPmToOps(sFromNick, | ||
- | |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: | |Core.SendPmToUser([[luaapi: | ||
- | ---- | + | | | | |
- | |Core.SetUserInfo([[luaapi: | + | |Core.SetUserInfo([[luaapi: |
luaapi/px_core.1350186636.txt.gz · Last modified: 14/10/2012 03:50 by ppk