/* have we been kicked? */
if (nicknameMatchesConnection(kickedFromChannel.connection(), kickedFromChannel.kickee())) {
+ Optional<Channel> channel = getChannel(network.get(), kickedFromChannel.channel());
+ if (!channel.isPresent()) {
+ /* maybe it was an extra channel? */
+ channel = getExtraChannel(network.get(), kickedFromChannel.channel());
+ if (!channel.isPresent()) {
+ /* okay, whatever. */
+ return;
+ }
+
+ extraChannels.remove(channel);
+ } else {
+ channels.remove(channel.get());
+ }
eventBus.post(new GenericMessage(format(
"Kicked from %s/%s by %s: %s",
kickedFromChannel.channel(), network.get(),