Lua Lobby: Difference between revisions
No edit summary |
|||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
<span style="color:red">'''Note: After discussion <ref>{{forumlink|topic=28935|title=anything against removal of lualobby?}}</ref> LuaLobby was removed<ref>[https://github.com/spring/spring/commit/05f61e76f7522096faeef2eaa6aaa16bc2b55d71 github commit]</ref> from engine > 91.0''' </span> | |||
Instead [[LuaSocket]] can be used. | |||
There's an existing LuaSocket implementation available at: https://github.com/gajop/liblobby with docs at: http://gajop.github.io/liblobby/. | |||
[[Engine_Development|Development]] < [[Lua_Scripting|Lua Scripting]] < {{FULLPAGENAME}} | [[Engine_Development|Development]] < [[Lua_Scripting|Lua Scripting]] < {{FULLPAGENAME}} | ||
| Line 8: | Line 13: | ||
'''lobby:Connect''' | '''lobby:Connect''' | ||
( string url, int port ) -> nil | ( string url, int port ) -> nil | ||
'''lobby:Disconnect''' | |||
( ) -> nil | |||
'''lobby:Login''' | '''lobby:Login''' | ||
( string username, string password ) -> nil | ( string username, string password ) -> nil | ||
| Line 71: | Line 78: | ||
[[category: Lua]] | [[category: Lua]] | ||
<references /> | |||
Latest revision as of 15:55, 11 May 2014
Note: After discussion [1] LuaLobby was removed[2] from engine > 91.0
Instead LuaSocket can be used. There's an existing LuaSocket implementation available at: https://github.com/gajop/liblobby with docs at: http://gajop.github.io/liblobby/.
Development < Lua Scripting < Lua Lobby
Create
Script.CreateLobby
( ) -> userdata lobby
Userdata Functions
lobby:Connect
( string url, int port ) -> nil
lobby:Disconnect
( ) -> nil
lobby:Login
( string username, string password ) -> nil
lobby:Rename
( string newname ) -> nil
lobby:ChangePass
( string oldpassword, string newpassword ) -> nil
lobby:Register
( string username, string password ) -> nil
lobby:ConfirmAggreement
( ) -> nil
lobby:JoinChannel
( string chan_name [,string password] ) -> nil
lobby:LeaveChannel
( string chan_name ) -> nil
lobby:Say
( string chan_name, string message ) -> nil
lobby:SayEx
( string chan_name, string message ) -> nil
lobby:SayPrivate
( string user_name, string message ) -> nil
lobby:StatusUpdate
( bool ingame, bool away ) -> nil
lobby:Channels
( ) -> nil
lobby:KickChannelMember
( string chan_name, string user_name, string reason) -> nil
lobby:ChangeTopic
( string chan_name, string topic) -> nil
lobby:Poll
( ) -> nil
Userdata Events
lobby.DoneConnecting = function(bool sucess, string error_message)
lobby.ServerGreeting = function(string server_version, string spring_version, int udp_port, int mode)
lobby.RegisterDenied = function(string reason)
lobby.RegisterAccepted = function()
lobby.LoginDenied = function(string reason)
lobby.LoginEnd = function()
lobby.Aggreement = function(string text)
lobby.Motd = function(string text)
lobby.ServerMessage = function(string text)
lobby.ServerMessageBox = function(string text, string url)
lobby.AddUser = function(string user_name, string country, number cpu)
lobby.RemoveUser = function(string user_name)
lobby.UserStatusUpdate = function(string user_name, bool away, bool bot, bool ingame, bool moderator, int rank)
lobby.ChannelInfo = function(string chan_name, int num_users)
lobby.ChannelInfoEnd = function()
lobby.RequestMutelist = function(string chan_name)
lobby.Mutelist = function(string chan_name, table {"userABC","userXYZ",...})
lobby.Joined = function(string chan_name)
lobby.JoinFailed = function(string chan_name, string reason)
lobby.ChannelMember = function(string chan_name, string user_name, bool joined)
lobby.ChannelMemberLeft = function(string chan_name, string user_name, string reason)
lobby.ChannelMemberKicked = function(string chan_name, string user_name, string reason)
lobby.ChannelTopic = function(string chan_name, string author, int time, string topic)
lobby.ChannelMessage = function(string chan_name, string text)
lobby.Said = function(string chan_name, string user_name, string text)
lobby.SaidEx = function(string chan_name, string user_name, string text)
lobby.SaidPrivate = function(string user_name, string text)
lobby.Disconnected = function()
lobby.NetworkError = function(string message)