summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2013-12-03 19:56:57 +0100
committerFlorent Le Coz <louiz@louiz.org>2013-12-03 19:56:57 +0100
commit6fa548a194082648724078cc777da34c30dd40a1 (patch)
treec95a8dd483c1c1b66277b199d58d6216aaa0771d /src/irc
parenta4c845ab6c54172ea305f33734c83238c75d421a (diff)
downloadbiboumi-6fa548a194082648724078cc777da34c30dd40a1.tar.gz
biboumi-6fa548a194082648724078cc777da34c30dd40a1.tar.bz2
biboumi-6fa548a194082648724078cc777da34c30dd40a1.tar.xz
biboumi-6fa548a194082648724078cc777da34c30dd40a1.zip
Display all the MODE arguments in the message
Diffstat (limited to 'src/irc')
-rw-r--r--src/irc/irc_client.cpp14
1 files changed, 11 insertions, 3 deletions
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);
}