Try to add LUA for connecting to server.
This commit is contained in:
@@ -866,13 +866,26 @@ CString NetworkSyncManager::MD5Hex( const CString &sInput )
|
||||
|
||||
return HashedName;
|
||||
}
|
||||
|
||||
static bool ConnectToServer( const CString &t )
|
||||
{
|
||||
NSMAN->PostStartUp( t );
|
||||
NSMAN->DisplayStartupStatus();
|
||||
return true;
|
||||
}
|
||||
|
||||
static Preference<CString> g_sLastServer( "LastConnectedServer", "" );
|
||||
|
||||
LuaFunction( ConnectToServer, ConnectToServer( ( CString(SArg(1)).length()==0 ) ? CString(g_sLastServer) : SArg(1) ) )
|
||||
|
||||
#endif
|
||||
|
||||
static bool ReportStyle() { NSMAN->ReportStyle(); return true; }
|
||||
|
||||
LuaFunction( IsSMOnlineLoggedIn, NSMAN->isSMOLoggedIn[IArg(1)] )
|
||||
LuaFunction_NoArgs( IsNetConnected, NSMAN->useSMserver )
|
||||
LuaFunction_NoArgs( IsNetSMOnline, NSMAN->isSMOnline )
|
||||
static bool ReportStyle() { NSMAN->ReportStyle(); return true; }
|
||||
LuaFunction_NoArgs( ReportStyle, ReportStyle() )
|
||||
LuaFunction( IsSMOnlineLoggedIn, NSMAN->isSMOLoggedIn[IArg(1)] )
|
||||
|
||||
/*
|
||||
* (c) 2003-2004 Charles Lohr, Joshua Allen
|
||||
|
||||
Reference in New Issue
Block a user