summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b53db87)
Now that account tracking exists, update extended-join to set account
data, too. This was accidentally left out of the IRCv3 fix-up pull
request.
Simplify account tracking in 'processIrcEventAccount'. No need to
check for '*' when that's used internally to represent logged-out.
Update documentation to mention 'extended-join' in WHOX and
IrcEventAccount handling.
IrcUser *ircuser = e->network()->updateNickFromMask(e->prefix());
if (ircuser) {
IrcUser *ircuser = e->network()->updateNickFromMask(e->prefix());
if (ircuser) {
- QString newAccount = e->params().at(0);
- // WHOX uses '0' to indicate logged-out, account-notify uses '*'
- if (newAccount != "*") {
- // Account logged in, set account name
- ircuser->setAccount(newAccount);
- } else {
- // Account logged out, set account name to logged-out
- ircuser->setAccount("*");
- }
+ // WHOX uses '0' to indicate logged-out, account-notify and extended-join uses '*'.
+ // As '*' is used internally to represent logged-out, no need to handle that differently.
+ ircuser->setAccount(e->params().at(0));
} else {
qDebug() << "Received account-notify data for unknown user" << e->prefix();
}
} else {
qDebug() << "Received account-notify data for unknown user" << e->prefix();
}
// If logged in, :nick!user@host JOIN #channelname accountname :Real Name
// If logged out, :nick!user@host JOIN #channelname * :Real Name
// See: http://ircv3.net/specs/extensions/extended-join-3.1.html
// If logged in, :nick!user@host JOIN #channelname accountname :Real Name
// If logged out, :nick!user@host JOIN #channelname * :Real Name
// See: http://ircv3.net/specs/extensions/extended-join-3.1.html
- // FIXME Keep track of authed user account, requires adding support to ircuser.h/cpp
+ // WHOX uses '0' to indicate logged-out, account-notify and extended-join uses '*'.
+ // As '*' is used internally to represent logged-out, no need to handle that differently.
+ ircuser->setAccount(e->params()[1]);
// Update the user's real name, too
ircuser->setRealName(e->params()[2]);
}
// Update the user's real name, too
ircuser->setRealName(e->params()[2]);
}
-/* RPL_WHOISACCOUNT: "<nick> <account> :is authed as */
+/* RPL_WHOISACCOUNT - "<nick> <account> :is authed as" */
void CoreSessionEventProcessor::processIrcEvent330(IrcEvent *e)
{
if (!checkParamCount(e, 3))
void CoreSessionEventProcessor::processIrcEvent330(IrcEvent *e)
{
if (!checkParamCount(e, 3))
// Don't use .section(" ", 1) with WHOX replies, for there's no hopcount to trim out
// As part of IRCv3 account-notify, check account name
// Don't use .section(" ", 1) with WHOX replies, for there's no hopcount to trim out
// As part of IRCv3 account-notify, check account name
- // WHOX uses '0' to indicate logged-out, account-notify uses '*'
+ // WHOX uses '0' to indicate logged-out, account-notify and extended-join uses '*'.
QString newAccount = e->params()[7];
if (newAccount != "0") {
// Account logged in, set account name
QString newAccount = e->params()[7];
if (newAccount != "0") {
// Account logged in, set account name