public void writeToChannel(String text){
        try{
            bw.write("PRIVMSG "+ channel +" :"+text+"\n");
            bw.flush();
        }catch(IOException e){
            System.out.println("IRC: Failure when trying to write to server: "+e.getMessage());
        }
    }