本文整理汇总了Java中org.kitteh.irc.client.library.event.client.ClientConnectedEvent类的典型用法代码示例。如果您正苦于以下问题:Java ClientConnectedEvent类的具体用法?Java ClientConnectedEvent怎么用?Java ClientConnectedEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ClientConnectedEvent类属于org.kitteh.irc.client.library.event.client包,在下文中一共展示了ClientConnectedEvent类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onClientConnected
import org.kitteh.irc.client.library.event.client.ClientConnectedEvent; //导入依赖的package包/类
@Handler
private void onClientConnected(ClientConnectedEvent event) {
if (configs.containsKey(PASSWORD_KEY)) {
AuthManager auth = client.getAuthManager();
auth.addProtocol(new SaslPlain(client,
client.getIntendedNick(), configs.get(PASSWORD_KEY)));
}
for (String channel : channels) {
try {
client.addChannel(channel);
logger.info("Joined '{}'", channel);
} catch (IllegalArgumentException e) {
logger.error("Invalid channel name '{}' on '{}'.",
channel,
configs.get(HOST_KEY), e);
}
}
}
示例2: onConnect
import org.kitteh.irc.client.library.event.client.ClientConnectedEvent; //导入依赖的package包/类
@Handler
public void onConnect(ClientConnectedEvent event)
{
Logger.getGlobal().info("Connected!");
}
示例3: connected
import org.kitteh.irc.client.library.event.client.ClientConnectedEvent; //导入依赖的package包/类
@Handler
public void connected(final ClientConnectedEvent e) {
this.humanity.getLogger().info("Connected to " + e.getServerInfo().getNetworkName() + " (" + e.getServer().getName() + ").");
}
示例4: onConnect
import org.kitteh.irc.client.library.event.client.ClientConnectedEvent; //导入依赖的package包/类
@Handler
public void onConnect(final ClientConnectedEvent event) throws Exception {
event.getClient().sendRawLine("/mode " + event.getClient().getNick() + " +B");
}