1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-10 11:15:09 -05:00

Show message on connect

This commit is contained in:
Sebastian Kaspari 2010-03-10 23:57:31 +01:00
parent 031c042d50
commit 66d3b2682b

View File

@ -75,8 +75,16 @@ public class IRCConnection extends PircBot
debug("Connect", "");
server.setStatus(Status.CONNECTED);
service.sendBroadcast(new Intent(Broadcast.SERVER_UPDATE));
Message message = new Message("Connected to " + server.getTitle());
message.setColor(Message.COLOR_GREEN);
server.getConversation(ServerInfo.DEFAULT_NAME).addMessage(message);
Intent intent = new Intent(Broadcast.CHANNEL_MESSAGE);
intent.putExtra(Broadcast.EXTRA_SERVER, server.getId());
intent.putExtra(Broadcast.EXTRA_CHANNEL, ServerInfo.DEFAULT_NAME);
service.sendBroadcast(intent);
}
/**