inkedmn
12-12-2002, 01:29 AM
:)
ok, here's the main class that runs the bot:
import joana.*;
public class Joana {
public static void main(String[] args) {
System.out.println("Main started.");
Irc irc = new Irc("irc.oftc.net");
System.out.println("irc object created");
Channel cf = new Channel(irc, "#coderforums");
System.out.println("channel joined");
cf.join();
/*try {
Thread.sleep(10000);
} catch (Exception e) {
System.out.println(e);
return;
}*/
System.out.println("Nick: " + irc.getNick());
irc.die();
}
}
when i run this, it prints the first print statement and then hangs (doesn't create the IRC object - i have a print statement that runs as the constructor is executed, but it never prints).
here's the constructor for Irc:
public Irc(String server) {
System.out.println("IRC constructor called");
this.server = server;
connect(server);
createStreams();
}
all the joana files are in the same directory (including the first file above to run the bot), d:\development\java_practice\joana.
that whole path (except joana) is in my classpath, and i omitted joana because it's a package.
so, i have no idea why the Irc object isn't being created...
ok, here's the main class that runs the bot:
import joana.*;
public class Joana {
public static void main(String[] args) {
System.out.println("Main started.");
Irc irc = new Irc("irc.oftc.net");
System.out.println("irc object created");
Channel cf = new Channel(irc, "#coderforums");
System.out.println("channel joined");
cf.join();
/*try {
Thread.sleep(10000);
} catch (Exception e) {
System.out.println(e);
return;
}*/
System.out.println("Nick: " + irc.getNick());
irc.die();
}
}
when i run this, it prints the first print statement and then hangs (doesn't create the IRC object - i have a print statement that runs as the constructor is executed, but it never prints).
here's the constructor for Irc:
public Irc(String server) {
System.out.println("IRC constructor called");
this.server = server;
connect(server);
createStreams();
}
all the joana files are in the same directory (including the first file above to run the bot), d:\development\java_practice\joana.
that whole path (except joana) is in my classpath, and i omitted joana because it's a package.
so, i have no idea why the Irc object isn't being created...