Send a proper error on IRC message 438 (nickname change too fast)

fix #2576
This commit is contained in:
Florent Le Coz
2014-08-08 00:47:05 +02:00
parent e3ea0d62c7
commit 41e8a3ba9b
2 changed files with 24 additions and 0 deletions
+5
View File
@@ -171,6 +171,10 @@ public:
* presence conflict from all channels, because the name is server-wide.
*/
void on_nickname_conflict(const IrcMessage& message);
/**
* Idem, but for when the user changes their nickname too quickly
*/
void on_nickname_change_too_fast(const IrcMessage& message);
/**
* Handles most errors from the server by just forwarding the message to the user.
*/
@@ -317,6 +321,7 @@ static const std::unordered_map<std::string, irc_callback_t> irc_callbacks = {
{"366", &IrcClient::on_channel_completely_joined},
{"432", &IrcClient::on_erroneous_nickname},
{"433", &IrcClient::on_nickname_conflict},
{"438", &IrcClient::on_nickname_change_too_fast},
{"001", &IrcClient::on_welcome_message},
{"PART", &IrcClient::on_part},
{"ERROR", &IrcClient::on_error},