org.walluck.oscar.tools
Class AdminTool

java.lang.Object
  extended by org.walluck.oscar.tools.Tool
      extended by org.walluck.oscar.tools.AdminTool
All Implemented Interfaces:
AdminListener, Listener, ServiceListener

public class AdminTool
extends Tool
implements AdminListener, ServiceListener

Admin tool.

Since:
1.0
Version:
1.0
Author:
David Walluck

Field Summary
 
Fields inherited from class org.walluck.oscar.tools.Tool
listeners
 
Constructor Summary
AdminTool()
          Creates a new Admin tool.
 
Method Summary
 void accountConfirm(AIMSession sess, AIMFrame frame, int status)
          Describe accountConfirm method here.
 void bosConnectionAvailable()
          Method called by the LoginTool once the BOS connection is available.
 void changeEmail(AIMSession sess, String eml)
          Describe changeEmail method here.
 void changePassword(AIMSession sess, String oldp, String newp)
          Describe changePassword method here.
 void confirmAccount(AIMSession sess)
          Describe confirmAccount method here.
 void evilNotify(AIMSession sess, AIMFrame frame, int newEvil, UserInfo userinfo)
          Describe evilNotify method here.
 void formatScreenname(AIMSession sess, String sn)
          Describe formatScreenname method here.
 void getEmail(AIMSession sess)
          Describe getEmail method here.
 void infoChange(AIMSession sess, AIMFrame frame, boolean infoChange, short perms, short err, String url, String sn, String email)
          Describe infoChange method here.
 void memRequest(AIMSession sess, AIMFrame frame, int offset, int len, String modname)
          Describe memRequest method here.
 void migrate(AIMSession sess, AIMFrame frame, String ip, byte[] cookie)
          Describe migrate method here.
 void motd(AIMSession sess, AIMFrame frame, int id, String msg)
          Describe motd method here.
 void rateChange(AIMSession sess, AIMFrame frame, int code, RateClass rc)
          Describe rateChange method here.
 void rateResp(AIMSession sess, AIMFrame frame)
          Describe rateResp method here.
 void redirect(AIMSession sess, AIMFrame frame, Redir redir)
          Describe redirect method here.
 void selfInfo(AIMSession sess, AIMFrame frame, UserInfo userinfo)
          Describe selfInfo method here.
 void serverPause(AIMSession sess, AIMFrame frame)
          Describe serverPause method here.
 void serverResume(AIMSession sess, AIMFrame frame)
          Describe serverResume method here.
 void shutdown(AIMSession sess)
          Called when the tool is shutting down.
 
Methods inherited from class org.walluck.oscar.tools.Tool
getFamily, getId, getSession, getToolData, getVersion, setFamily, setId, setSession, setToolData, setVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdminTool

public AdminTool()
Creates a new Admin tool. Family 0x0007.

Method Detail

changePassword

public void changePassword(AIMSession sess,
                           String oldp,
                           String newp)
                    throws IOException
Describe changePassword method here.

Parameters:
sess - an AIMSession value
oldp - a String value
newp - a String value
Throws:
IOException - if an error occurs

formatScreenname

public void formatScreenname(AIMSession sess,
                             String sn)
                      throws IOException
Describe formatScreenname method here.

Parameters:
sess - an AIMSession value
sn - a String value
Throws:
IOException - if an error occurs

confirmAccount

public void confirmAccount(AIMSession sess)
                    throws IOException
Describe confirmAccount method here.

Parameters:
sess - an AIMSession value
Throws:
IOException - if an error occurs

getEmail

public void getEmail(AIMSession sess)
              throws IOException
Describe getEmail method here.

Parameters:
sess - an AIMSession value
Throws:
IOException - if an error occurs

changeEmail

public void changeEmail(AIMSession sess,
                        String eml)
                 throws IOException
Describe changeEmail method here.

Parameters:
sess - an AIMSession value
eml - a String value
Throws:
IOException - if an error occurs

infoChange

public void infoChange(AIMSession sess,
                       AIMFrame frame,
                       boolean infoChange,
                       short perms,
                       short err,
                       String url,
                       String sn,
                       String email)
Describe infoChange method here.

Specified by:
infoChange in interface AdminListener
Parameters:
sess - an AIMSession value
frame - an AIMFrame value
infoChange - a boolean value
perms - a short value
err - a short value
url - a String value
sn - a String value
email - a String value

accountConfirm

public void accountConfirm(AIMSession sess,
                           AIMFrame frame,
                           int status)
Describe accountConfirm method here.

Specified by:
accountConfirm in interface AdminListener
Parameters:
sess - an AIMSession value
frame - an AIMFrame value
status - an int value

rateResp

public void rateResp(AIMSession sess,
                     AIMFrame frame)
Describe rateResp method here.

Specified by:
rateResp in interface ServiceListener
Parameters:
sess - an AIMSession value
frame - an AIMFrame value

redirect

public void redirect(AIMSession sess,
                     AIMFrame frame,
                     Redir redir)
Describe redirect method here.

Specified by:
redirect in interface ServiceListener
Parameters:
sess - an AIMSession value
frame - an AIMFrame value
redir - a Redir value

rateChange

public void rateChange(AIMSession sess,
                       AIMFrame frame,
                       int code,
                       RateClass rc)
Description copied from interface: ServiceListener
Describe rateChange method here.

Specified by:
rateChange in interface ServiceListener
Parameters:
sess - an AIMSession value
frame - an AIMFrame value
code - an int value
rc - a RateClass value

serverPause

public void serverPause(AIMSession sess,
                        AIMFrame frame)
Description copied from interface: ServiceListener
Describe serverPause method here.

Specified by:
serverPause in interface ServiceListener
Parameters:
sess - an AIMSession value
frame - an AIMFrame value

serverResume

public void serverResume(AIMSession sess,
                         AIMFrame frame)
Description copied from interface: ServiceListener
Describe serverResume method here.

Specified by:
serverResume in interface ServiceListener
Parameters:
sess - an AIMSession value
frame - an AIMFrame value

selfInfo

public void selfInfo(AIMSession sess,
                     AIMFrame frame,
                     UserInfo userinfo)
Description copied from interface: ServiceListener
Describe selfInfo method here.

Specified by:
selfInfo in interface ServiceListener
Parameters:
sess - an AIMSession value
frame - an AIMFrame value
userinfo - an UserInfo value

evilNotify

public void evilNotify(AIMSession sess,
                       AIMFrame frame,
                       int newEvil,
                       UserInfo userinfo)
Description copied from interface: ServiceListener
Describe evilNotify method here.

Specified by:
evilNotify in interface ServiceListener
Parameters:
sess - an AIMSession value
frame - an AIMFrame value
newEvil - an int value
userinfo - an UserInfo value

migrate

public void migrate(AIMSession sess,
                    AIMFrame frame,
                    String ip,
                    byte[] cookie)
Description copied from interface: ServiceListener
Describe migrate method here.

Specified by:
migrate in interface ServiceListener
Parameters:
sess - an AIMSession value
frame - an AIMFrame value
ip - a String value
cookie - a byte[] value

motd

public void motd(AIMSession sess,
                 AIMFrame frame,
                 int id,
                 String msg)
Description copied from interface: ServiceListener
Describe motd method here.

Specified by:
motd in interface ServiceListener
Parameters:
sess - an AIMSession value
frame - an AIMFrame value
id - an int value
msg - a String value

memRequest

public void memRequest(AIMSession sess,
                       AIMFrame frame,
                       int offset,
                       int len,
                       String modname)
Description copied from interface: ServiceListener
Describe memRequest method here.

Specified by:
memRequest in interface ServiceListener
Parameters:
sess - an AIMSession value
frame - an AIMFrame value
offset - an int value
len - an int value
modname - a String value

shutdown

public void shutdown(AIMSession sess)
Called when the tool is shutting down.

Specified by:
shutdown in class Tool
Parameters:
sess - the oscar session

bosConnectionAvailable

public void bosConnectionAvailable()
Method called by the LoginTool once the BOS connection is available. This allows the other tools to get registered and get involved in the process.

Specified by:
bosConnectionAvailable in class Tool