The complete source code of IdealIRC http://www.idealirc.org/
 
 
 
 
idealirc/IRCClient/Commands/cmdV3Away.cpp

24 lines
751 B

/*
* IdealIRC Core - Internet Relay Chat API
* Copyright (C) 2021 Tom-Andre Barstad.
* This software is licensed under the Software Attribution License.
* See LICENSE for more information.
*/
#include "../IRCBase.h"
#include "../IRCBasePriv.h"
void IRCBasePriv::cmdV3Away(const IRCMessage& ircmessage)
{
const auto& sender = ircmessage.getSender();
std::vector<std::string> channelsAffected;
auto member = super.getMember(sender.nickname());
if (member) {
const auto& chans = member->channels();
for (const auto& c : chans) {
const auto cptr = c.lock();
channelsAffected.push_back(cptr->name());
}
}
super.v3onMsgAway(sender, ircmessage.getMessage(), channelsAffected);
}