package ircClient;

import org.jibble.pircbot.PircBot;

public class IRCClient extends PircBot {

    private IRCClientFrame parent;

    public IRCClient(IRCClientFrame parent, String login) {
	this.setName(login);
	this.parent = parent;
    }

    public IRCClient(IRCClientFrame parent) {
	this.setName("");
	this.parent = parent;
    }

    public void onMessage(String channel, String sender, String login,
	    String hostname, String message) {
	parent.addMessage(sender, message);
    }

    public void setUserName(String name) {
	this.setName(name);
    }

}

@@ -11,17 +11,19 @@
 cClient;
-%0A
+%0D%0A%0D
 %0Aimport 
@@ -49,17 +49,19 @@
 PircBot;
-%0A
+%0D%0A%0D
 %0Apublic 
@@ -93,17 +93,19 @@
 ircBot %7B
-%0A
+%0D%0A%0D
 %0A    pri
@@ -131,17 +131,19 @@
  parent;
-%0A
+%0D%0A%0D
 %0A    pub
@@ -194,16 +194,17 @@
 login) %7B
+%0D
 %0A%09this.s
@@ -217,16 +217,17 @@
 (login);
+%0D
 %0A%09this.p
@@ -233,39 +233,42 @@
 parent = parent;
+%0D
 %0A    %7D
-%0A
+%0D%0A%0D
 %0A    public IRCC
@@ -297,16 +297,17 @@
 arent) %7B
+%0D
 %0A%09this.s
@@ -317,16 +317,17 @@
 ame(%22%22);
+%0D
 %0A%09this.p
@@ -341,23 +341,26 @@
  parent;
+%0D
 %0A    %7D
-%0A
+%0D%0A%0D
 %0A    pub
@@ -422,16 +422,17 @@
 g login,
+%0D
 %0A%09    St
@@ -463,16 +463,17 @@
 ssage) %7B
+%0D
 %0A%09parent
@@ -501,23 +501,26 @@
 essage);
+%0D
 %0A    %7D
-%0A
+%0D%0A%0D
 %0A    pub
@@ -554,16 +554,17 @@
  name) %7B
+%0D
 %0A%09this.s
@@ -580,14 +580,291 @@
 me);
+%0D
 %0A    %7D
-%0A%0A%7D
+%0D%0A%0D%0A    @Override%0D%0A    protected void onConnect() %7B%0D%0A        super.onConnect();%0D%0A        System.out.println(%22Connection successful%22);%0D%0A    %7D%0D%0A    @Override%0D%0A    protected void onDisconnect() %7B%0D%0A        super.onDisconnect();%0D%0A        System.out.println(%22Disconnected%22);%0D%0A    %7D%0D%0A%7D%0D
 %0A

set connection messages to pircbot built-in functions