My favorites | Sign in
Project Logo
                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import java.io.*;

import rath.nateon.*;
import rath.nateon.event.*;

public class Test
{
public static void main( String[] args ) throws Exception
{
Debug.printInput = true;
Debug.printOutput = true;

final NateOnMessenger nateon = new NateOnMessenger(args[0], args[1]);
nateon.setAutoAccept(true);
nateon.addNateOnListener( new NateOnAdapter() {
public void loginComplete( NateUser me )
{
System.out.println( "* Login complete: " + me );
}

public void smsReceived( String from, String to, String msg )
throws IOException
{
System.out.println( "* SMS From: " + from );
System.out.println( msg );
}

public void channelMessage( ChatChannel channel, String from, String font, String msg )
{
System.out.println( from + " says: " + msg );
try
{
channel.sendMessage( "t-_-t" );
}
catch( IOException e )
{
e.printStackTrace();
}
}
});
nateon.login();
/*
Thread.sleep( 5000L );
System.out.println( "Send SMS..." );
nateon.sendSMS( "01000000000", "dsalkdjsalkdjs" );
*/
}
}
Show details Hide details

Change log

r2 by xrathx on Nov 17, 2008   Diff
initial import
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 1073 bytes, 48 lines
Hosted by Google Code