1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-22 00:42:16 -05:00

Display message at the beginning and end of the server login

This commit is contained in:
Sebastian Kaspari 2011-06-10 22:29:17 +02:00
parent 2f19eb8032
commit 6e48a29b34
2 changed files with 18 additions and 0 deletions

View File

@ -120,6 +120,8 @@
<string name="notification_mentions">New messages in: %1$s</string>
<string name="message_connected">Connected to %1$s</string>
<string name="message_now_login">Now logging in...</string>
<string name="message_login_done">Server login done.</string>
<string name="message_deop">%1$s deops %2$s</string>
<string name="message_devoice">%1$s devoices %2$s</string>
<string name="message_invite_you">%1$s invites you into %2$s</string>

View File

@ -151,6 +151,10 @@ public class IRCConnection extends PircBot
message.setColor(Message.COLOR_GREEN);
server.getConversation(ServerInfo.DEFAULT_NAME).addMessage(message);
Message infoMessage = new Message(service.getString(R.string.message_now_login));
infoMessage.setColor(Message.COLOR_GREY);
server.getConversation(ServerInfo.DEFAULT_NAME).addMessage(infoMessage);
Intent intent = Broadcast.createConversationIntent(
Broadcast.CONVERSATION_MESSAGE,
server.getId(),
@ -203,6 +207,18 @@ public class IRCConnection extends PircBot
joinChannel(channel);
}
}
Message infoMessage = new Message(service.getString(R.string.message_login_done));
infoMessage.setColor(Message.COLOR_GREY);
server.getConversation(ServerInfo.DEFAULT_NAME).addMessage(infoMessage);
Intent intent = Broadcast.createConversationIntent(
Broadcast.CONVERSATION_MESSAGE,
server.getId(),
ServerInfo.DEFAULT_NAME
);
service.sendBroadcast(intent);
}
/**
* On channel action