@@ -613,7 +613,7 @@ else if (request.startsWith("DCC ")) {
613
613
sourceUser = createUserIfNull (sourceUser , source );
614
614
615
615
bot .getUserChannelDao ().addUserToChannel (sourceUser , channel );
616
- configuration .getListenerManager ().onEvent (new JoinEvent (bot , channel , source , sourceUser ));
616
+ configuration .getListenerManager ().onEvent (new JoinEvent (bot , channel , source , sourceUser , tags ));
617
617
} else if (command .equals ("PART" )) {
618
618
// Someone is parting from a channel.
619
619
UserChannelDaoSnapshot daoSnapshot ;
@@ -635,7 +635,7 @@ else if (request.startsWith("DCC ")) {
635
635
else
636
636
//Just remove the user from memory
637
637
bot .getUserChannelDao ().removeUserFromChannel (sourceUser , channel );
638
- configuration .getListenerManager ().onEvent (new PartEvent (bot , daoSnapshot , channelSnapshot , channel .getName (), source , sourceSnapshot , message ));
638
+ configuration .getListenerManager ().onEvent (new PartEvent (bot , daoSnapshot , channelSnapshot , channel .getName (), source , sourceSnapshot , message , tags ));
639
639
} else if (command .equals ("NICK" )) {
640
640
// Somebody is changing their nick.
641
641
sourceUser = createUserIfNull (sourceUser , source );
@@ -644,7 +644,7 @@ else if (request.startsWith("DCC ")) {
644
644
if (source .getNick ().equals (bot .getNick ()))
645
645
// Update our nick if it was us that changed nick.
646
646
bot .setNick (newNick );
647
- configuration .getListenerManager ().onEvent (new NickChangeEvent (bot , source .getNick (), newNick , source , sourceUser ));
647
+ configuration .getListenerManager ().onEvent (new NickChangeEvent (bot , source .getNick (), newNick , source , sourceUser , tags ));
648
648
} else if (command .equals ("NOTICE" )) {
649
649
// Someone is sending a notice.
650
650
configuration .getListenerManager ().onEvent (new NoticeEvent (bot , source , sourceUser , channel , target , message , tags ));
@@ -664,7 +664,7 @@ else if (request.startsWith("DCC ")) {
664
664
if (!source .getNick ().equals (bot .getNick ()))
665
665
//Someone else
666
666
bot .getUserChannelDao ().removeUser (sourceUser );
667
- configuration .getListenerManager ().onEvent (new QuitEvent (bot , daoSnapshot , source , sourceSnapshot , reason ));
667
+ configuration .getListenerManager ().onEvent (new QuitEvent (bot , daoSnapshot , source , sourceSnapshot , reason , tags ));
668
668
} else if (command .equals ("KICK" )) {
669
669
// Somebody has been kicked from a channel.
670
670
UserHostmask recipientHostmask = bot .getConfiguration ().getBotFactory ().createUserHostmask (bot , message );
@@ -676,7 +676,7 @@ else if (request.startsWith("DCC ")) {
676
676
else
677
677
//Someone else
678
678
bot .getUserChannelDao ().removeUserFromChannel (recipient , channel );
679
- configuration .getListenerManager ().onEvent (new KickEvent (bot , channel , source , sourceUser , recipientHostmask , recipient , parsedLine .get (2 )));
679
+ configuration .getListenerManager ().onEvent (new KickEvent (bot , channel , source , sourceUser , recipientHostmask , recipient , parsedLine .get (2 ), tags ));
680
680
} else if (command .equals ("MODE" )) {
681
681
// Somebody is changing the mode on a channel or user (Use long form since mode isn't after a : )
682
682
String mode = line .substring (line .indexOf (target , 2 ) + target .length () + 1 );
@@ -687,7 +687,7 @@ else if (request.startsWith("DCC ")) {
687
687
//User sourceModeUser = sourceUser;
688
688
//if (sourceModeUser == null)
689
689
// sourceModeUser = bot.getUserChannelDao().getUser(source);
690
- processMode (source , sourceUser , target , mode );
690
+ processMode (source , sourceUser , target , mode , tags );
691
691
} else if (command .equals ("TOPIC" )) {
692
692
// Someone is changing the topic.
693
693
long currentTime = System .currentTimeMillis ();
@@ -696,7 +696,7 @@ else if (request.startsWith("DCC ")) {
696
696
channel .setTopicSetter (source );
697
697
channel .setTopicTimestamp (currentTime );
698
698
699
- configuration .getListenerManager ().onEvent (new TopicEvent (bot , channel , oldTopic , message , source , currentTime , true ));
699
+ configuration .getListenerManager ().onEvent (new TopicEvent (bot , channel , oldTopic , message , source , currentTime , true , tags ));
700
700
} else if (command .equals ("INVITE" )) {
701
701
// Somebody is inviting somebody else into a channel.
702
702
configuration .getListenerManager ().onEvent (new InviteEvent (bot , source , sourceUser , message ));
@@ -794,7 +794,7 @@ public void processServerResponse(int code, String rawResponse, List<String> par
794
794
channel .setTopicTimestamp (date * 1000 );
795
795
channel .setTopicSetter (setBy );
796
796
797
- configuration .getListenerManager ().onEvent (new TopicEvent (bot , channel , null , channel .getTopic (), setBy , date , false ));
797
+ configuration .getListenerManager ().onEvent (new TopicEvent (bot , channel , null , channel .getTopic (), setBy , date , false , ImmutableMap . of () ));
798
798
} else if (code == RPL_WHOREPLY ) {
799
799
//EXAMPLE: 352 PircBotX #aChannel ~someName 74.56.56.56.my.Hostmask wolfe.freenode.net someNick H :0 Full Name
800
800
//Part of a WHO reply on information on individual users
@@ -872,7 +872,7 @@ public void processServerResponse(int code, String rawResponse, List<String> par
872
872
String mode = StringUtils .join (modeParsed , ' ' );
873
873
874
874
channel .setMode (mode , modeParsed );
875
- configuration .getListenerManager ().onEvent (new ModeEvent (bot , channel , null , null , mode , modeParsed ));
875
+ configuration .getListenerManager ().onEvent (new ModeEvent (bot , channel , null , null , mode , modeParsed , ImmutableMap . of () ));
876
876
} else if (code == 329 ) {
877
877
//EXAMPLE: 329 lordquackstar #botters 1199140245
878
878
//Tells when channel was created. From /JOIN
@@ -1089,7 +1089,7 @@ else if (code == RPL_MOTD) {
1089
1089
* @param target The channel or nick that the mode operation applies to.
1090
1090
* @param mode The mode that has been set.
1091
1091
*/
1092
- public void processMode (UserHostmask userHostmask , User user , String target , String mode ) {
1092
+ public void processMode (UserHostmask userHostmask , User user , String target , String mode , ImmutableMap < String , String > tags ) {
1093
1093
if (configuration .getChannelPrefixes ().indexOf (target .charAt (0 )) >= 0 ) {
1094
1094
// The mode of a channel is being changed.
1095
1095
Channel channel = bot .getUserChannelDao ().getChannel (target );
@@ -1112,12 +1112,12 @@ else if (curModeChar == '-')
1112
1112
modeHandler .handleMode (bot , channel , userHostmask , user , params , adding , true );
1113
1113
}
1114
1114
}
1115
- configuration .getListenerManager ().onEvent (new ModeEvent (bot , channel , userHostmask , user , mode , modeParsed ));
1115
+ configuration .getListenerManager ().onEvent (new ModeEvent (bot , channel , userHostmask , user , mode , modeParsed , tags ));
1116
1116
} else {
1117
1117
// The mode of a user is being changed.
1118
1118
UserHostmask targetHostmask = bot .getConfiguration ().getBotFactory ().createUserHostmask (bot , target );
1119
1119
User targetUser = bot .getUserChannelDao ().getUser (target );
1120
- configuration .getListenerManager ().onEvent (new UserModeEvent (bot , userHostmask , user , targetHostmask , targetUser , mode ));
1120
+ configuration .getListenerManager ().onEvent (new UserModeEvent (bot , userHostmask , user , targetHostmask , targetUser , mode , tags ));
1121
1121
}
1122
1122
}
1123
1123
0 commit comments