X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcoresessioneventprocessor.cpp;h=bc7d1fbf893194aa65adf10b36234bd0b87de31c;hb=46a76ffbf0e9e7af3d4ceb074c0b8dff461b4a86;hp=e3eca41caa0a8d31f3143cb2627c3ad12a36d505;hpb=68478cb98a582e4a5b9b8cc188de51287d0da6b0;p=quassel.git diff --git a/src/core/coresessioneventprocessor.cpp b/src/core/coresessioneventprocessor.cpp index e3eca41c..bc7d1fbf 100644 --- a/src/core/coresessioneventprocessor.cpp +++ b/src/core/coresessioneventprocessor.cpp @@ -190,6 +190,51 @@ void CoreSessionEventProcessor::processIrcEvent266(IrcEvent *) { // TODO: save information in network object } +/* +WHOIS-Message: + Replies 311 - 313, 317 - 319 are all replies generated in response to a WHOIS message. + and 301 (RPL_AWAY) + " :" +WHO-Message: + Replies 352 and 315 paired are used to answer a WHO message. + +WHOWAS-Message: + Replies 314 and 369 are responses to a WHOWAS message. + +*/ + +/* RPL_AWAY - " :" */ +void CoreSessionEventProcessor::processIrcEvent301(IrcEvent *e) { + if(!checkParamCount(e, 2)) + return; + + IrcUser *ircuser = e->network()->ircUser(e->params().at(0)); + if(ircuser) { + ircuser->setAway(true); + ircuser->setAwayMessage(e->params().at(1)); + //ircuser->setLastAwayMessage(now); + } +} + +/* RPL_UNAWAY - ":You are no longer marked as being away" */ +void CoreSessionEventProcessor::processIrcEvent305(IrcEvent *e) { + IrcUser *me = e->network()->me(); + if(me) + me->setAway(false); + + if(e->network()->autoAwayActive()) { + e->network()->setAutoAwayActive(false); + e->setFlag(EventManager::Silent); + } +} + +/* RPL_NOWAWAY - ":You have been marked as being away" */ +void CoreSessionEventProcessor::processIrcEvent306(IrcEvent *e) { + IrcUser *me = e->network()->me(); + if(me) + me->setAway(true); +} + /* template void CoreSessionEventProcessor::processIrcEvent(IrcEvent *e) { if(!checkParamCount(e, 1))