Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / ircd / m_away.c
index 959508429cc80424f917605a9e254793285ab563..787e570bd32087b2853e2ee4592b6e63517dae1f 100644 (file)
@@ -113,7 +113,7 @@ int m_away(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   assert(0 != cptr);
   assert(cptr == sptr);
 
-  if (user_set_away(sptr->user, away_message)) {
+  if (user_set_away(cli_user(sptr), away_message)) {
     sendcmdto_serv_butone(sptr, CMD_AWAY, cptr, ":%s", away_message);
     send_reply(sptr, RPL_NOWAWAY);
   }
@@ -143,7 +143,7 @@ int ms_away(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   if (IsServer(sptr))
     return protocol_violation(sptr,"Server trying to set itself away");
 
-  if (user_set_away(sptr->user, away_message))
+  if (user_set_away(cli_user(sptr), away_message))
     sendcmdto_serv_butone(sptr, CMD_AWAY, cptr, ":%s", away_message);
   else
     sendcmdto_serv_butone(sptr, CMD_AWAY, cptr, "");