Advertisement
Guest User

Untitled

a guest
Oct 3rd, 2010
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.23 KB | None | 0 0
  1.     public void main() throws Exception
  2.     {
  3.         //initiations
  4.         BufferedWriter bw = null;
  5.         BufferedReader br = null;
  6.         String tempS;
  7.        
  8.         try
  9.         {
  10.             // put your code here
  11.             Socket DaloIrc = IC.connect();
  12.            
  13.             if(DaloIrc != null)
  14.             {
  15.                 if(DaloIrc.isConnected())
  16.                 {
  17.                     //our output stream
  18.                     bw = new BufferedWriter(new OutputStreamWriter(DaloIrc.getOutputStream()));
  19.                    
  20.                     //our input stream
  21.                     br = new BufferedReader(new InputStreamReader(DaloIrc.getInputStream()));
  22.                 }
  23.  
  24. /**
  25.      * This resolvs the title page of webpages
  26.      * @throws java.io.IOException
  27.      */
  28.     public void WebPageTitle(String webPage) throws IOException
  29.     {
  30.         say(webPage);
  31.         bw.flush();
  32.     }
  33.  
  34.     /**
  35.      * General purpose method for inputting into the channel at hand
  36.      * @param message
  37.      * @throws java.io.IOException
  38.      */
  39.     public void say( String message ) throws IOException
  40.     {
  41.        
  42.         bw.write( "PRIVMSG " + channel + " :" + message + "\n" );
  43.         bw.flush();
  44.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement