E D R S I H C RSS
ID
Password
Join
우리는 흔히 신의 뜻대로 이루어지기를 바라서가 아니라 우리 뜻대로 되기를 바라서 기도를 한다.―헬가 B.그로스



Contents

1 nebulae
1.1 예제 스크립트 : ChatBot
1.2 예제 스크립트 : CreateUserScript
2 커널 업그레이드 관련
3 보조 리눅스 PC 보드 관련

1 nebulae #

1.1 예제 스크립트 : ChatBot #

이것은 메세지를 수신한 후 @AllUsers로 답장하는 간단한 스크립트입니다. 이 예제는 서버스크립트가 무비와 그룹에 가입하는 방법과, 서버에 연결되어있는 다른 사용자들에게 연결되어있는 사용자로서 보이는 방법을 보여주고 있습니다.

예제 스크립트를 컴파일하면 ChatBotScript.classPostDelay.class화일이 생깁니다. 이 화일들은 nebulae가 초기화될 때 VM에서 로딩하도록 classpath에 나열된 디렉토리 안에 들어있어야 합니다.

그다음에는 Scriptmap.cfg화일을 서버상의 무비이름과 연결해주어야합니다. 예를 들면 아래와 같습니다.
CHAT = ChatBotScript


1.2 예제 스크립트 : CreateUserScript #

This is a simple script that acquires the ServerUserDatabase interface and can be used to create and delete users on the server. The sample is constructed to illustrate how to parse and construct property lists and interface with standard Nebulae objects (ServerUserDatabase in this example.)

To test this script your movie can send the following messages to the Nebulae server:
Recipient: system.script.createUser
Content: [#userid:"username", #password:"password", #userlevel: 20]
Recipient: system.script.deleteUser
Content: [#userid:"username"]

The advantage of using the server side approach is to be able to create users when using the SQL database for user authentication, transparently. When used with the standard Nebulae MUSDB these commands will produce results similar to

system.DBAdmin.createUser
system.DBAdmin.deleteUser

Compiling this file will generate one Java Class, CreateUserSample.java. It should be put in a directory listed in the classpath when Nebulae is initialized, in order to be loaded by the Java Virtual Machine. You should also configure the Scriptmap.cfg file to associate the CreateUserSample class with a movie name on your server, for example:

CREATEUSERTEST = CreateUserSample

You may utilize this source file to create and compile object code for use within products you may create. THIS CODE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.


2 커널 업그레이드 관련 #

3 보조 리눅스 PC 보드 관련 #


Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2010-10-28 12:42:52
Processing time 0.4383 sec