+ void OnPostJoin(Membership *memb) CXX11_OVERRIDE
+ {
+ if ((!awaynotify) || (!memb->user->IsAway()))
+ return;
+
+ std::string line = ":" + memb->user->GetFullHost() + " AWAY :" + memb->user->awaymsg;
+
+ const UserMembList* userlist = memb->chan->GetUsers();
+ for (UserMembCIter it = userlist->begin(); it != userlist->end(); ++it)
+ {
+ // Send the away notify line if the current member is local, has the away-notify cap and isn't excepted
+ User* member = IS_LOCAL(it->first);
+ if ((member) && (cap_awaynotify.ext.get(member)) && (last_excepts.find(member) == last_excepts.end()))
+ {
+ member->Write(line);
+ }
+ }
+
+ last_excepts.clear();
+ }
+