away stuff from ratbox3

This commit is contained in:
Valery Yatsko 2008-04-02 03:03:15 +04:00
parent 1b95ca0b6a
commit ece36b7b5d
2 changed files with 20 additions and 0 deletions

View File

@ -609,4 +609,7 @@ extern void close_connection(struct Client *);
extern void init_uid(void);
extern char *generate_uid(void);
void allocate_away(struct Client *);
void free_away(struct Client *);
#endif /* INCLUDED_client_h */

View File

@ -1936,6 +1936,23 @@ free_user(struct User *user, struct Client *client_p)
}
}
void
allocate_away(struct Client *client_p)
{
if(client_p->user->away == NULL)
client_p->user->away = rb_bh_alloc(away_heap);
}
void
free_away(struct Client *client_p)
{
if(client_p->user->away != NULL) {
rb_bh_free(away_heap, client_p->user->away);
client_p->user->away = NULL;
}
}
void
init_uid(void)
{