summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/guildhandler.cpp82
-rw-r--r--src/net/ea/guildhandler.h4
2 files changed, 41 insertions, 45 deletions
diff --git a/src/net/ea/guildhandler.cpp b/src/net/ea/guildhandler.cpp
index 2364cfa9a..0cc03d805 100644
--- a/src/net/ea/guildhandler.cpp
+++ b/src/net/ea/guildhandler.cpp
@@ -448,49 +448,6 @@ void GuildHandler::processGuildLeave(Net::MessageIn &msg) const
}
}
-void GuildHandler::processGuildExpulsion(Net::MessageIn &msg) const
-{
- msg.skip(2); // size (can be many explusions in list)
- const std::string nick = msg.readString(24); // Name (of expulsed?)
- msg.skip(24); // acc
- msg.readString(44); // Message
- if (taGuild)
- taGuild->removeMember(nick);
-
- if (!localPlayer)
- return;
-
- if (nick == localPlayer->getName())
- {
- if (taGuild)
- {
- taGuild->removeFromMembers();
- taGuild->clearMembers();
- }
- NotifyManager::notify(NotifyTypes::GUILD_KICKED);
- delete2(guildTab)
-
- if (socialWindow && taGuild)
- socialWindow->removeTab(taGuild);
- if (actorManager)
- actorManager->updatePlayerColors();
- }
- else
- {
- NotifyManager::notify(NotifyTypes::GUILD_USER_KICKED, nick);
- if (actorManager)
- {
- Being *const b = actorManager->findBeingByName(
- nick, ActorType::Player);
-
- if (b)
- b->clearGuilds();
- if (taGuild)
- taGuild->removeMember(nick);
- }
- }
-}
-
void GuildHandler::processGuildExpulsionList(Net::MessageIn &msg) const
{
const int length = msg.readInt16();
@@ -577,4 +534,43 @@ ChatTab *GuildHandler::getTab() const
return guildTab;
}
+void GuildHandler::processGuildExpulsionContinue(const std::string &nick) const
+{
+ if (taGuild)
+ taGuild->removeMember(nick);
+
+ if (!localPlayer)
+ return;
+
+ if (nick == localPlayer->getName())
+ {
+ if (taGuild)
+ {
+ taGuild->removeFromMembers();
+ taGuild->clearMembers();
+ }
+ NotifyManager::notify(NotifyTypes::GUILD_KICKED);
+ delete2(guildTab)
+
+ if (socialWindow && taGuild)
+ socialWindow->removeTab(taGuild);
+ if (actorManager)
+ actorManager->updatePlayerColors();
+ }
+ else
+ {
+ NotifyManager::notify(NotifyTypes::GUILD_USER_KICKED, nick);
+ if (actorManager)
+ {
+ Being *const b = actorManager->findBeingByName(
+ nick, ActorType::Player);
+
+ if (b)
+ b->clearGuilds();
+ if (taGuild)
+ taGuild->removeMember(nick);
+ }
+ }
+}
+
} // namespace Ea
diff --git a/src/net/ea/guildhandler.h b/src/net/ea/guildhandler.h
index ee3ce2672..2bfa4c4a2 100644
--- a/src/net/ea/guildhandler.h
+++ b/src/net/ea/guildhandler.h
@@ -81,8 +81,6 @@ class GuildHandler notfinal : public Net::GuildHandler
virtual void processGuildLeave(Net::MessageIn &msg) const;
- virtual void processGuildExpulsion(Net::MessageIn &msg) const;
-
virtual void processGuildExpulsionList(Net::MessageIn &msg) const;
virtual void processGuildMessage(Net::MessageIn &msg) const;
@@ -99,6 +97,8 @@ class GuildHandler notfinal : public Net::GuildHandler
virtual void processGuildBroken(Net::MessageIn &msg) const;
+ void processGuildExpulsionContinue(const std::string &nick) const;
+
void clear() const override final;
ChatTab *getTab() const override final;