From 6fa548a194082648724078cc777da34c30dd40a1 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 3 Dec 2013 19:56:57 +0100 Subject: Display all the MODE arguments in the message --- src/irc/irc_client.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp index 1a9e61b..af3df62 100644 --- a/src/irc/irc_client.cpp +++ b/src/irc/irc_client.cpp @@ -377,10 +377,18 @@ void IrcClient::on_channel_mode(const IrcMessage& message) iid.chan = message.arguments[0]; iid.server = this->hostname; IrcUser user(message.prefix); + std::string mode_arguments; + for (size_t i = 1; i < message.arguments.size(); ++i) + { + if (!message.arguments[i].empty()) + { + if (i != 1) + mode_arguments += " "; + mode_arguments += message.arguments[i]; + } + } this->bridge->send_message(iid, "", std::string("Mode ") + iid.chan + - " [" + message.arguments[1] + - (message.arguments.size() > 2 ? (" " + message.arguments[2]): "") - + "] by " + user.nick, + " [" + mode_arguments + "] by " + user.nick, true); } -- cgit v1.2.3