home *** CD-ROM | disk | FTP | other *** search
/ The Net: Ultimate Internet Guide / WWLCD1.ISO / pc / java / in4wjcxu / src / como / irc / comoircclient.java < prev    next >
Encoding:
Java Source  |  1996-08-14  |  17.2 KB  |  667 lines

  1. package como.irc;
  2.  
  3. import java.awt.*;
  4. import java.applet.Applet;
  5. import java.net.*;
  6. import java.io.*;
  7. import java.util.*;
  8.  
  9. import como.awt.*;
  10. import como.commlet.*;
  11. import como.util.*;
  12. import como.io.*;
  13. import como.sys.*;
  14.  
  15. public class ComoIRCClient extends Applet {
  16.     ComoIRCClientFrame comoframe;
  17.     static int IRC_PORT = 6667;
  18.     static final String VERSION = "V1.00";
  19.  
  20.     String[][] params = {
  21.         {"IRCPort","int","IRC Server port to connect to"},
  22.         {"HelpPage","http-address","A http-address of the help-page"}
  23.     };
  24.  
  25.     public void init()    {
  26.         int ircport;
  27.         URL helppage;
  28.         String s;
  29.  
  30.         s = getParameter("IRCPort"); 
  31.         try { 
  32.             ircport = (new Integer(s.trim())).intValue(); 
  33.         } 
  34.         catch (Exception e) {
  35.             ircport = IRC_PORT; 
  36.         }
  37.  
  38.         s = getParameter( "HelpPage" ); 
  39.         if( s == null || !s.startsWith( "http://" ) )
  40.             s = "http://www4.informatik.uni-erlangen.de/IMMD-IV/Projects/como/doc/como-irc-help.html";
  41.  
  42.         try {
  43.             helppage = new URL( s );
  44.         } catch( MalformedURLException e ) {
  45.             helppage = null;
  46.             Debug.msg( 9, "ComoIRCClient.init(): no helppage" );
  47.         }
  48.  
  49.         comoframe = new ComoIRCClientFrame( this, ircport, helppage );
  50.     }
  51.  
  52.     // start and stop methods not needed, we have our own frame!
  53.     public void start() {
  54.         return;
  55.     }
  56.     public void stop() {    
  57.         return;
  58.     }
  59.  
  60.     public String getAppletInfo() {
  61.         return "ComoIRCClient "+VERSION+" (c) Jan Kautz & Ulrich Gall Tel. +49-9131-201329";
  62.     }
  63.     public String[][] getParameterInfo() {
  64.         return params;
  65.     }
  66. }
  67.  
  68. class ComoIRCClientFrame extends Frame implements ComoIRCFrontEnd {
  69.     static int COMMLET_LINES = 7;
  70.     static int USER_LINES = 8;
  71.     static int CHANNEL_LINES = 6;
  72.     static int MIN_NAME_LENGTH = 2;
  73.     static int IRC_MAX_NICK_LENGTH = 9;
  74.     static int IMGSIZE = 96;
  75.  
  76.     static final int COMMLET_NAME = 0;
  77.     static final int COMMLET_ICON_NAME = 1;
  78.     static final int COMMLET_DESCRIPTION = 2;
  79.  
  80.     static final String USER_CHOICE_ALL = "All Available Users";
  81.     static final String USER_CHOICE_USER = "Users matching pattern";
  82.     static final String USER_CHOICE_CHANNEL = "Users on channel";
  83.  
  84.     static int EVENT_INVITATION_ACCEPTED = 15015;
  85.     static int EVENT_INVITATION_REJECTED = 15016;
  86.  
  87.     List userlist;
  88.     User[] users;
  89.     Button userupdate;
  90.     Choice userchoice;
  91.     TextField userpattern;
  92.     Checkbox usercomoonly;
  93.     
  94.     Button commletstartbutton;
  95.     Panel commletpanel;
  96.     TextField commletdescriptionfield;
  97.     ImageButton commletimagebuttons[];
  98.     String commletnames[][];
  99.     
  100.     List channellist;
  101.     IrcChan[] channels;
  102.     Hashtable channelHT;
  103.     Button channelupdate;
  104.     TextField channelpattern;
  105.     Checkbox channelcomoonly;
  106.     Button channeljoinbutton;
  107.     Button channelviewbutton;
  108.     Button channelinvitebutton;
  109.  
  110.     MenuItem miquit;
  111.     MenuItem mihelp;
  112.  
  113.     URL helppage;
  114.     int ircport;
  115.  
  116.     Panel userpanel;
  117.     Hashtable userHT;
  118.     Panel channelpanel;
  119.  
  120.     TextField logTF;    
  121.     TextField nickTF;
  122.     TextField nameTF;
  123.     UserPanel loginuserpanel;
  124.     SmartFrame loginNameTooShort;
  125.     SmartFrame loginClickMap;
  126.     User ego;
  127.     
  128.     ServerIRC server = null;
  129.     Applet applet;
  130.  
  131.     Image map;
  132.  
  133.     public ComoIRCClientFrame( Applet applet, int ircport, URL helppage )    {
  134.         super( "ComoClient Applet"  );
  135.  
  136.         this.helppage = helppage;
  137.         this.ircport = ircport;
  138.         this.applet = applet;
  139.  
  140.         try {
  141.             map = applet.getImage(new URL(applet.getDocumentBase(),"worldmap"));
  142.         }
  143.         catch (Exception e) {
  144.             map = null;
  145.         }
  146.  
  147.         makeMenu();
  148.         showLogin();
  149.         pack();
  150.         show();
  151.     }
  152.     
  153.  
  154.     /**
  155.      * Displays a dialog that will let the user login in.
  156.      */
  157.     public void showLogin() {
  158.         removeAll();
  159.  
  160.         setLayout(new BorderLayout());
  161.         Panel p = new Panel();
  162.         p.setLayout(new VertLayout(VertLayout.STRETCH));
  163.         p.add(new Label("Please fill in the following information to log in:"));
  164.         p.add(new Label("On the map, click at your current location"));
  165.         add("North",p);
  166.         ego = new User(0,"");
  167.         ego.put(ego.COMMENT,"");
  168.         ego.put(ego.LOCATION,new Integer(0)); // that way we will not set a default position
  169.         loginuserpanel = new UserPanel(ego,"Click here to log in!",map);
  170.         add("Center",loginuserpanel);
  171.  
  172.         ego = null;
  173.  
  174.         paintAll(getGraphics());
  175.     }
  176.  
  177.     public void makeMenu() {
  178.         MenuBar menubar = new MenuBar();
  179.         Menu menfile = new Menu("File");
  180.         Menu menhelp = new Menu("Help");
  181.  
  182.         miquit = new MenuItem("Quit");
  183.         mihelp = new MenuItem("How to use Como");
  184.  
  185.         menfile.add( miquit );
  186.         menhelp.add( mihelp );
  187.  
  188.         menubar.add( menfile );
  189.         menubar.add( menhelp );
  190.  
  191.         // this will be the help menu!
  192.         menubar.setHelpMenu( menhelp );
  193.  
  194.         setMenuBar( menubar );
  195.     }
  196.     
  197.     private void showLists()    {
  198.         createUserPanel();
  199.         createCommletPanel();
  200.         createChannelPanel(); 
  201.         
  202.         setLayout(new VertLayout(VertLayout.STRETCH));
  203.         
  204.         removeAll();
  205.  
  206.         add(userpanel);
  207.         add(commletpanel);
  208.         add(channelpanel);
  209.  
  210.         logTF = new TextField();
  211.         logTF.setEditable(false);
  212.         Panel p = new Panel();
  213.         p.setLayout(new BorderLayout());
  214.         p.add("West",new Label("Status:"));
  215.         p.add("Center",logTF);
  216.         add(p);
  217.  
  218.         pack();
  219.         layout();
  220.         paintAll(getGraphics());
  221.     }
  222.  
  223.     private void createUserPanel() {
  224.         userpanel = new Panel();
  225.         userpanel.setLayout(new BorderLayout());
  226.         userlist = new List(USER_LINES,true);
  227.         userpanel.add("Center",userlist);
  228.         Panel p = new Panel();
  229.         p.setLayout(new BorderLayout());
  230.         userchoice=new Choice();
  231.         userchoice.addItem(USER_CHOICE_ALL);
  232.         userchoice.addItem(USER_CHOICE_USER);
  233.         userchoice.addItem(USER_CHOICE_CHANNEL);
  234.         p.add("West",userchoice);
  235.         userpattern = new TextField("*");
  236.         p.add("Center",userpattern);
  237.         usercomoonly = new Checkbox("Como Users Only");
  238.         usercomoonly.setState(true);
  239. //        p.add(usercomoonly);
  240.         userupdate = new Button("Update");
  241.         p.add("East",userupdate);
  242.         userpanel.add("North",p);
  243.         updateuserlist();
  244.     }
  245.     private void createChannelPanel() {
  246.         channelpanel = new Panel();
  247.         channelpanel.setLayout(new BorderLayout());
  248.         channellist = new List(CHANNEL_LINES,false);
  249.         channelpanel.add("Center",channellist);
  250.         Panel p = new Panel();
  251.         p.setLayout(new BorderLayout());
  252.         p.add("West",new Label("Available channels matching "));
  253.         channelpattern = new TextField("*",10);
  254.         p.add("Center",channelpattern);
  255.         channelcomoonly = new Checkbox("Como channels Only");
  256.         channelcomoonly.setState(true);
  257. //        p.add(channelcomoonly);
  258.         channelupdate = new Button("Update");
  259.         p.add("East",channelupdate);
  260.         channelpanel.add("North",p);
  261.         channeljoinbutton = new Button ("Join this channel");
  262.         channeljoinbutton.disable();
  263.         channelviewbutton = new Button ("See who is on this channel");
  264.         channelviewbutton.disable();
  265.         channelinvitebutton = new Button("Invite selected Users");
  266.         channelinvitebutton.disable();
  267.         Panel q = new Panel();
  268.         q.add(channelviewbutton);
  269.         q.add(channeljoinbutton);
  270.         q.add(channelinvitebutton);
  271.         channelpanel.add("South",q);
  272.         updatechannellist();
  273.     }
  274.  
  275.     private synchronized void updatechannellist() {
  276.         showStatus("Updating Channel List...");
  277.         channellist.delItems(0,channellist.countItems()-1);
  278.         channels = server.getChannels(channelpattern.getText(),channelcomoonly.getState());
  279.         channelHT = new Hashtable();
  280.         String s = null;
  281.         for (int i = 0;i<channels.length;i++)
  282.         {
  283.             IrcChan c = channels[i];
  284.             s = c.commletname + " session with topic '" + c.topic+"'";
  285.             channellist.addItem(s);
  286.             channelHT.put(s,new Integer(i));
  287.         }
  288.         channelinvitebutton.disable();
  289.         channeljoinbutton.disable();
  290.         channelviewbutton.disable();
  291.         clearStatus();
  292.     }
  293.     
  294.     private synchronized void updateuserlist() {
  295.         showStatus("Updating User List...");
  296.  
  297.         userHT = new Hashtable();
  298.         userlist.delItems(0,userlist.countItems()-1);
  299.  
  300.         String pattern = userpattern.getText().trim();
  301.         boolean comoonly = usercomoonly.getState();
  302.  
  303.         if (userchoice.getSelectedItem() == USER_CHOICE_ALL)
  304.             pattern = "*";
  305.  
  306.         users = server.getUsers(pattern,comoonly);
  307.         for (int i = 0;i<users.length;i++)
  308.         {
  309.             User u = users[i];
  310.             StringBuffer s = new StringBuffer();
  311.  
  312.             if (u.containsKey(u.NAME)) s.append(u.get(u.NAME).toString());
  313.             if (u.containsKey(u.NICK)) s.append(" ("+u.get(u.NICK).toString()+")");
  314.  
  315. /*            if ((u.containsKey(u.COMOUSER)) && (u.get(u.COMOUSER) == Boolean.TRUE))
  316.             s.append(" using Como as ");
  317.             else
  318.             s.append(" using IRC as "); */
  319.  
  320.             if (u.containsKey(u.COMMENT)) s.append(" ("+u.get(u.COMMENT).toString()+")"); 
  321.  
  322.             userlist.addItem(s.toString());
  323.             userHT.put(s.toString(),new Integer(i));
  324.         }
  325.  
  326.         clearStatus();
  327.         if (commletstartbutton != null) commletstartbutton.disable();
  328.     }
  329.  
  330.     private void clearStatus() {
  331.         if (ego != null)
  332.             showStatus(ego.get(User.NAME).toString() + "'s Como Session");
  333.         else
  334.             showStatus("");
  335.     }
  336.  
  337.     private void createCommletPanel() {
  338.         Vector lines;
  339.  
  340.         Panel commletbuttonpanel = new Panel();
  341.         commletpanel = new Panel();
  342.  
  343.         commletpanel.setLayout(new BorderLayout());
  344.         commletbuttonpanel.setLayout( new FlowLayout() );
  345.  
  346.         try {
  347.             URL url = new URL(applet.getDocumentBase(),server.PATH_COMMLET_LIST);
  348.             lines = StreamLine.loadLines( new DataInputStream(url.openStream()) );
  349.         } catch( Exception e ) {
  350.             commletpanel.add("North",new Label("Sorry, could not load available commlets!"));
  351.             commletpanel.add("South",new Label("Please try again later."));
  352.             return;
  353.         }
  354.  
  355.         int nrlines = lines.size();
  356.         commletnames = new String[nrlines][3];  // CommletName, PicName, Description
  357.         commletimagebuttons = new ImageButton[nrlines]; // ImageButtons for them
  358.  
  359.         for( int i = 0; i < nrlines; i++ ) {
  360.             String line = (String)lines.elementAt(i);
  361.             int first = line.indexOf( ':' );
  362.             int second = line.indexOf( ':', first+1 );
  363.  
  364.             commletnames[i][COMMLET_NAME] = line.substring( 0, first-1 ).trim();
  365.             commletnames[i][COMMLET_ICON_NAME] = line.substring( first+2, second-1 ).trim();
  366.             commletnames[i][COMMLET_DESCRIPTION] = line.substring( second+2 ).trim();
  367.  
  368.             try {
  369.                 URL url = new URL( applet.getDocumentBase(), server.PATH_COMMLET_ICONS+commletnames[i][1] );
  370.                 Image image = applet.getImage( url );
  371.                 commletimagebuttons[i] = new ImageButton( image, image, IMGSIZE, IMGSIZE );
  372.             }
  373.             catch( Exception e ) {
  374.                 commletimagebuttons[i] = new ImageButton( IMGSIZE, IMGSIZE, commletnames[i][0] );
  375.             }
  376.  
  377.             commletbuttonpanel.add( commletimagebuttons[i] );
  378.         }
  379.  
  380.         commletdescriptionfield = new TextField();
  381.         commletdescriptionfield.setEditable( false );
  382.  
  383.         commletpanel.add("North",new Label("Available Commlets"));
  384.         commletpanel.add("Center", commletbuttonpanel );
  385.         commletpanel.add("South", commletdescriptionfield );
  386.     }
  387.  
  388.     public void logout() {
  389.         // Ask the user if he wants to log out?
  390.  
  391.         if( server != null )
  392.             server.logout();
  393.         hide();
  394.         dispose();
  395.  
  396.         // don't show the Login anymore.. (we did first)
  397.         // showLogin();
  398.     }
  399.  
  400.     public boolean action(Event evt,Object what) {
  401.         if (evt.target == miquit) {
  402.             logout();
  403.             return true;
  404.         }
  405.         else if (evt.target == mihelp) {
  406.             // At the moment just show it instead of the current page
  407.             // This causes no problem, because we don't do anything in
  408.             // the stop()-Method.
  409.  
  410.             if( helppage != null )
  411.                 applet.getAppletContext().showDocument( helppage, "_blank" );
  412.         }
  413.         else if (evt.target == loginuserpanel) {
  414.                 ego = loginuserpanel.getUser();
  415.  
  416.                 if (ego.get(ego.LOCATION) instanceof Integer) {
  417.                     if ((loginClickMap == null) || (!loginClickMap.isVisible())) {
  418.                         loginClickMap = new SmartFrame("Please click on the map where you are from.");
  419.                         }
  420.                     return true;
  421.                     }
  422.                 if (ego.get(ego.NAME).toString().trim().length()  <= MIN_NAME_LENGTH) {
  423.                     if ((loginNameTooShort == null) || (!loginNameTooShort.isVisible())) {
  424.                         loginNameTooShort = new SmartFrame("Your name must be at least "+
  425.                                     (MIN_NAME_LENGTH+1)+" characters long.");
  426.                         }
  427.                     return true;
  428.                     }
  429.                 clearStatus();
  430.                 ego.put(ego.COLOR, new Color(ego.hashCode()));
  431.                 removeAll();
  432.  
  433.                 setLayout( new BorderLayout() );
  434.                 add( "North", new Label("Logging in, please wait...") );
  435.  
  436.                 layout();
  437.                 paintAll(getGraphics());
  438.  
  439.                 if (loginNameTooShort != null) {
  440.                     loginNameTooShort.dispose();
  441.                     loginNameTooShort = null;
  442.                 }
  443.                 if (loginClickMap != null) {
  444.                     loginClickMap.dispose();
  445.                     loginClickMap = null;
  446.                 }
  447.  
  448.                 try {
  449.                     server = new ServerIRC(ego,applet.getDocumentBase().getHost(),ircport,this);
  450.                 } catch( IOException e ) {
  451.                     new SmartFrame( "Couldn't connect to server, try again later" );
  452.                     noConnection();
  453.                     return true;
  454.                 }
  455.                 showLists();
  456.                 return true;
  457.         }
  458.         else if (ego != null) {
  459.  
  460.             for( int i = 0; i < commletnames.length; i++ )
  461.             {
  462.                 if (evt.target == commletimagebuttons[i]) {
  463.                     // clicked on a commlet-button
  464.  
  465.                     String commletname = commletnames[i][COMMLET_NAME];
  466.  
  467.                     int[] selints = userlist.getSelectedIndexes();
  468.                     if( selints.length > 0 )
  469.                     {
  470.                         User[] u = new User[selints.length];
  471.  
  472.                         for( int j=0; j < selints.length; j++ )
  473.                             u[j] = users[selints[j]];
  474.  
  475.                         showStatus("Starting Commlet " + commletname + " with " + selints.length + " users");                 
  476.                         server.startCommunication(commletname,u,commletname + " started on " + (new Date()).toString());
  477.                     }
  478.                     else {
  479.                         new SmartFrame( "Select some users before starting a Commlet!" );
  480.                     }
  481.  
  482.                     clearStatus();
  483.                     return true;
  484.                 }
  485.             }
  486.  
  487.             if (evt.target == userlist) {
  488.                 // double clicked on a user -> show info about that user
  489.                 // (ask server)
  490.                 showStatus("Retrieving Information about "+evt.arg.toString());
  491.                 //    User u = server.getUser(users[((Integer)userHT.get(evt.arg)).intValue()]);
  492.                 User u = users[((Integer)userHT.get(evt.arg)).intValue()];
  493.                 
  494.                 Frame f = new SmartFrame();
  495.                 f.setLayout(new VertLayout(VertLayout.STRETCH));
  496.                 f.add(new UserPanel(u,""));
  497.                 f.pack();
  498.                 f.setTitle( "User Information" );
  499.                 f.show();
  500.                 clearStatus();
  501.                 return true;
  502.             }
  503.  
  504.             if ((evt.target == userupdate) || (evt.target==userpattern) || (evt.target == userchoice))
  505.             {
  506.                 updateuserlist();
  507.             }
  508.  
  509.             if ((evt.target == channelupdate)|| (evt.target==channelpattern))
  510.             {
  511.                 updatechannellist();
  512.             }
  513.  
  514.             if ((evt.target == channellist) || (evt.target == channelviewbutton)) 
  515.             {
  516.                 IrcChan chan = null;
  517.                 if (evt.target == channelviewbutton) {
  518.                     if (channellist.getSelectedIndex() != -1) 
  519.                         chan = channels[channellist.getSelectedIndex()];
  520.                 }
  521.                 else
  522.                     if (evt.arg != null) chan = channels[((Integer)channelHT.get(evt.arg)).intValue()];
  523.                 String s = "";    
  524.                 if (chan != null) {
  525.                     s = "#"+chan.channel+"~"+chan.commletname;
  526.                 showStatus("Updating User List to display users on channel "+s);
  527.                 userpattern.setText(s);
  528.                 userchoice.select(2);
  529.                 updateuserlist();
  530.                         }
  531.                 else {
  532.                     //MODAL
  533.                 }
  534.             }
  535.  
  536.             if (evt.target == channeljoinbutton)
  537.             {
  538.                 showStatus("Joining Channel "+channellist.getSelectedItem());
  539.                 server.joinChannel(channels[channellist.getSelectedIndex()]);
  540.             }
  541.  
  542.             if (evt.target == channelinvitebutton)
  543.             {
  544.                     int[] selints = userlist.getSelectedIndexes();
  545.                     showStatus("Inviting "+selints.length+" users to channel "+channellist.getSelectedItem());
  546.                     for (int i=0;i<selints.length;i++) 
  547.                         server.sendInvitation(channels[channellist.getSelectedIndex()],users[selints[i]]);
  548.             }
  549.         }
  550.         return false;        
  551.     }
  552.  
  553.     public void handleInvitation(User u,IrcChan chan) {
  554.         SmartFrame f = new SmartFrame(this,
  555.              "Yes, accept",new Event(this,EVENT_INVITATION_ACCEPTED,chan),
  556.             "No, reject",new Event(this,EVENT_INVITATION_REJECTED,null));
  557.         f.setTitle("Invitation received...");
  558.         Panel p = new Panel();
  559.         p.setLayout(new VertLayout(VertLayout.CENTER));
  560.         String name = u.get(u.NAME).toString();
  561.         String comment = u.get(u.COMMENT).toString();
  562.         if( comment.length() > 0 )
  563.             p.add(new Label("Invitation from "+name+" ("+comment+")"));
  564.         else
  565.             p.add(new Label("Invitation from "+name));
  566.         p.add(new Label("Would you like to join a "+chan.commletname+ " Session?"));
  567.         p.add(new Label("Topic : "+chan.topic));
  568.         f.add("North",p);
  569.         f.pack();
  570.         f.show();
  571.     }        
  572.  
  573.     public boolean handleEvent(Event evt) {
  574.  
  575.         if (evt.id == Event.MOUSE_ENTER )
  576.         {
  577.             if( commletnames == null ) return false;
  578.  
  579.             // look if the mouse moved over a commlet-imagebutton 
  580.             for( int i = 0; i < commletnames.length; i++ )
  581.             {
  582.                 if (evt.target == commletimagebuttons[i]) {
  583.                     commletdescriptionfield.setText( commletnames[i][COMMLET_NAME]+" : "+
  584.                         commletnames[i][COMMLET_DESCRIPTION] );
  585.  
  586.                     return true;
  587.                 }
  588.             }
  589.  
  590.             return false;
  591.         }
  592.  
  593.         if (evt.id == Event.WINDOW_DESTROY ) {
  594.             logout();
  595.             return true;
  596.         }
  597.  
  598.         if (evt.id == EVENT_INVITATION_REJECTED) {
  599.             ((Frame)evt.target).dispose();
  600.             return true;
  601.         }
  602.  
  603.         if (evt.id == EVENT_INVITATION_ACCEPTED) {
  604.             server.joinChannel((IrcChan)evt.arg);
  605.             ((Frame)evt.target).dispose();
  606.             return true;
  607.         }
  608.  
  609.         if (evt.target == channellist) {
  610.             if (channellist.getSelectedIndex() == -1) {
  611.                 channelviewbutton.disable();
  612.                 channeljoinbutton.disable();    
  613.             }
  614.             else {
  615.                 channelviewbutton.enable();
  616.                 channeljoinbutton.enable();    
  617.             }
  618.         }
  619.  
  620.         if ((evt.target == channellist) || (evt.target == userlist)) {
  621.             if ((channellist.getSelectedIndex() != -1) 
  622.                 && (userlist.getSelectedIndexes().length >0) 
  623.                 && (server.isUserOnChannel(ego,channels[channellist.getSelectedIndex()]))) {
  624.                 channelinvitebutton.enable();
  625.             }
  626.             else {
  627.                 channelinvitebutton.disable();
  628.             }
  629.         }
  630.  
  631.         return super.handleEvent(evt);
  632.     }
  633.  
  634.     public void log(String s) {
  635.         if( logTF != null )
  636.         {
  637.             logTF.setText( s );
  638.             logTF.select( 0, 0 );
  639.         }
  640.     }
  641.  
  642.     public void showStatus( String s ) {
  643.         log( s );
  644.         // applet.showStatus( s );
  645.     }
  646.  
  647.     public synchronized void addUser(String nick) {
  648.         if (userlist != null) updateuserlist();
  649.     }
  650.  
  651.     public synchronized void userLeft(String nick) {
  652.         updateuserlist();
  653.     }
  654.  
  655.     public void noConnection() {
  656.         showLogin();
  657.     }
  658.  
  659.     public Applet getApplet() {
  660.         return applet;
  661.     }
  662.  
  663.     public void leftChannel(IrcChan chan) {
  664.         return;
  665.     }
  666. }
  667.