]> jfr.im git - solanum.git/commitdiff
away stuff from ratbox3
authorValery Yatsko <redacted>
Tue, 1 Apr 2008 23:03:15 +0000 (03:03 +0400)
committerValery Yatsko <redacted>
Tue, 1 Apr 2008 23:03:15 +0000 (03:03 +0400)
include/client.h
src/client.c

index caa051925ff5e20bbf4096c177e5c4997eaf2331..943098e6fed6f4ff3ff6560ec2909f7c36607e71 100644 (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 *);\r
+void free_away(struct Client *);
+
 #endif /* INCLUDED_client_h */
index c4ade72a543dd77d6ea5565f75179ae59fde9941..e035c0cf3326425d37cbc292cad46462cab7f4e3 100644 (file)
@@ -1936,6 +1936,23 @@ free_user(struct User *user, struct Client *client_p)
        }
 }
 
+void\r
+allocate_away(struct Client *client_p)\r
+{\r
+       if(client_p->user->away == NULL)\r
+               client_p->user->away = rb_bh_alloc(away_heap);  \r
+}\r
+\r
+\r
+void\r
+free_away(struct Client *client_p)\r
+{\r
+       if(client_p->user->away != NULL) {\r
+               rb_bh_free(away_heap, client_p->user->away);\r
+               client_p->user->away = NULL;\r
+       }\r
+}
+
 void
 init_uid(void)
 {