diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2020-09-29 22:18:33 +0200 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2020-09-29 22:25:23 +0200 |
commit | a8a0603375fa4c5c1e61bd8a0dc0ed7f3f77854e (patch) | |
tree | c1749d16c7fe8fad8b0d04cc80092cd22c180a9d /event.c | |
parent | 1ecfdb8eef2e1cf5c9f017708b6313ea5d4093d7 (diff) |
server: Implement room_leave
Diffstat (limited to 'event.c')
-rw-r--r-- | event.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -98,3 +98,13 @@ void event_emit_join(i64 timestamp,const char *user,const char *room){ event_emit(event); event_item_free(event); } + +void event_emit_leave(i64 timestamp,const char *user,const char *room){ + struct event_item *event=event_item_alloc(); + event->type=EVENT_LEAVE; + event->timestamp=timestamp; + event->user=strdup(user); + event->room=strdup(room); + event_emit(event); + event_item_free(event); +} |