return c;
}
}
final Chat chat = ChatManager.getInstanceFor(this.connection).createChat(chatPartner, null);
Bot bot = new Bot(new JabberChat(chat, this), this.groupChatNick,
this.desc.getHost(), this.botCommandPrefix, this.authentication);
this.bots.add(bot);
if (msg != null) {
// replay original message:
bot.onMessage(new JabberMessage(msg, isAuthorized(msg.getFrom())));
}
chatCache.put(chatPartner, new WeakReference<Chat>(chat));
return chat;
}