Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 3rd, 2010  |  syntax: Java  |  size: 1.23 KB  |  views: 34  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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.     }
clone this paste RAW Paste Data