mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-25 18:32:15 -05:00
Implemented IRCConnection.onJoin()
This commit is contained in:
parent
7445f51422
commit
9d90a2d40e
@ -123,13 +123,17 @@ public class IRCConnection extends PircBot
|
|||||||
* On Join
|
* On Join
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void onJoin(String channel, String sender, String login, String hostname)
|
protected void onJoin(String target, String sender, String login, String hostname)
|
||||||
{
|
{
|
||||||
debug("Join", channel + " " + sender);
|
debug("Join", target + " " + sender);
|
||||||
|
|
||||||
if (sender.equals(getNick())) {
|
if (sender.equals(getNick())) {
|
||||||
// We joined a new channel
|
// We joined a new channel
|
||||||
server.addChannel(new Channel(channel));
|
server.addChannel(new Channel(target));
|
||||||
|
service.sendBroadcast(new Intent(Broadcast.CHANNEL_NEW));
|
||||||
|
} else {
|
||||||
|
server.getChannel(target).addMessage(sender + " joined");
|
||||||
|
service.sendBroadcast(new Intent(Broadcast.CHANNEL_MESSAGE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,32 +25,5 @@ public class Broadcast
|
|||||||
public static final String SERVER_UPDATE = "org.yaaic.server.status";
|
public static final String SERVER_UPDATE = "org.yaaic.server.status";
|
||||||
|
|
||||||
public static final String CHANNEL_MESSAGE = "org.yaaic.channel.message";
|
public static final String CHANNEL_MESSAGE = "org.yaaic.channel.message";
|
||||||
/*
|
public static final String CHANNEL_NEW = "org.yaaic.channel.new";
|
||||||
public static final String CHANNEL_ACTION = "org.yaaic.channel.action";
|
|
||||||
public static final String CHANNEL_INFO = "org.yaaic.channel.info";
|
|
||||||
public static final String CHANNEL_DEOP = "org.yaaic.channel.deop";
|
|
||||||
public static final String CHANNEL_DEVOICE = "org.yaaic.channel.devoice";
|
|
||||||
public static final String CHANNEL_INVITE = "org.yaaic.channel.invite";
|
|
||||||
public static final String CHANNEL_JOIN = "org.yaaic.channel.join";
|
|
||||||
public static final String CHANNEL_KICK = "org.yaaic.channel.kick";
|
|
||||||
public static final String CHANNEL_MESSAGE = "org.yaaic.channel.message";
|
|
||||||
public static final String CHANNEL_MODE = "org.yaaic.channel.mode";
|
|
||||||
public static final String CHANNEL_OP = "org.yaaic.channel.op";
|
|
||||||
public static final String CHANNEL_PART = "org.yaaic.channel.part";
|
|
||||||
public static final String CHANNEL_TOPIC = "org.yaaic.channel.topic";
|
|
||||||
public static final String CHANNEL_USER = "org.yaaic.channel.user";
|
|
||||||
public static final String CHANNEL_VOICE = "org.yaaic.channel.voice";
|
|
||||||
|
|
||||||
public static final String USER_NICK = "org.yaaic.user.nick";
|
|
||||||
public static final String USER_NOTICE = "org.yaaic.user.notice";
|
|
||||||
public static final String USER_MESSAGE = "org.yaaic.user.message";
|
|
||||||
public static final String USER_QUIT = "org.yaaic.user.quit";
|
|
||||||
|
|
||||||
public static final String EXTRA_SENDER = "sender";
|
|
||||||
public static final String EXTRA_CHANNEL = "channel";
|
|
||||||
public static final String EXTRA_MESSAGE = "message";
|
|
||||||
public static final String EXTRA_TOPIC = "topic";
|
|
||||||
public static final String EXTRA_USERCOUNT = "usercount";
|
|
||||||
public static final String EXTRA_RECEIVER = "receiver";
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user