I have bot connected to IRC server and its not crashing all the time the bot is crashing with Exception in thread "main" java.lang.NullPointerException at bot.Report.main(Report.java:47) The 47 line is
if (!(str.split(" ")[1].equals("QUIT") || str.split(" ")[1].equals("PART") || str.split(" ")[1].equals("JOIN")))
Edit more code
String str = null;
PrintWriter o;
Socket s;
BufferedReader i1;
s = new Socket("", 6667);
i1 = new BufferedReader(new InputStreamReader(s.getInputStream()));
o = new PrintWriter(new OutputStreamWriter(s.getOutputStream()));
o.print("PASS " + "" + "\r\n");
o.print("USER " + "" + " 0 * :" + ""
+ "\r\n" + "NICK " + "" + "\r\n");
o.print("JOIN " + "#test" + "\r\n");
o.flush();
while (s.isConnected()) {
str = i1.readLine();
StringBuffer stringBuffer = null;
if (!(str.split(" ")[1].equals("QUIT") || str.split(" ")[1].equals("PART") || str.split(" ")[1].equals("JOIN"))) {
......