1

What I wish to do, is to get the user list when my bot joins a channel, and for it to create an instance of my custom user class. However, it doesn't seem to work. I am using Pircbot 1.5.0.

Here's what I have for my onUserList and onJoin functions:

@Override
protected void onUserList(String channel, User[] users) {
    for (User u : users) {
        String nick = u.getNick();
        if (!isRegistered(nick)) {
            this.users.put(nick, PermLevel.USER);
        }
    }
}

@Override
protected void onJoin(String channel, String sender, String login, String hostname) {
    if (!sender.equals(getNick()) && !isRegistered(sender)) {
        this.users.put(sender, PermLevel.USER);
    }
}
TT.
  • 15,774
  • 6
  • 47
  • 88

0 Answers0