d8d89d245e
Room flags (e.g., whether or not to auto-join, whether notifications should be sent on message receive) can now be toggled through a room's right-click menu in the room-list. Two new room flags were added for notifications as well― ROOM_NOTIFY_DM and ROOM_NOTIFY_ALL. If ROOM_NOTIFY_DM is enabled, the user will receive notifications if they are in a one-on-one chat. If ROOM_NOTIFY_ALL, they will receive notifications on every message sent to the room. The default menu items for the room's pop-up menu were moved from Templates.rdef to be built into the app. Everything else in Templates.rdef should follow suit― B_TRANSLATE can't be used in rdef files!
44 lines
1.1 KiB
C
44 lines
1.1 KiB
C
/*
|
|
* Copyright 2021, Jaidyn Levesque <jadedctrl@teknik.io>
|
|
* All rights reserved. Distributed under the terms of the MIT license.
|
|
*/
|
|
#ifndef FLAGS_H
|
|
#define FLAGS_H
|
|
|
|
// AUTOJOIN, AUTOCREATE, LOG, POPULATE, NOTIFY
|
|
// Auto-join on login, auto-create on login (non-persistent rooms), keep local
|
|
// logs, populate chat with local logs on join, notify on direct message,
|
|
// notify on all new messages…
|
|
|
|
// JCLP
|
|
// 0000
|
|
|
|
#define ROOM_AUTOJOIN 1
|
|
#define ROOM_AUTOCREATE 2
|
|
#define ROOM_LOG_LOCALLY 4
|
|
#define ROOM_POPULATE_LOGS 8
|
|
#define ROOM_NOTIFY_DM 16
|
|
#define ROOM_NOTIFY_ALL 32
|
|
|
|
|
|
// NAME, SUBJECT, ROLECHANGE, BAN, KICK, DEAFEN, MUTE, NICK, READ, WRITE
|
|
// Set name of room, set subject, change user's "role" (permission presets
|
|
// defined by the protocol), etc…
|
|
|
|
// NSRBKDMNRW
|
|
// 0000000000
|
|
|
|
#define PERM_WRITE 1
|
|
#define PERM_READ 2
|
|
#define PERM_NICK 4
|
|
#define PERM_MUTE 8
|
|
#define PERM_DEAFEN 16
|
|
#define PERM_KICK 32
|
|
#define PERM_BAN 64
|
|
#define PERM_ROLECHANGE 128
|
|
#define PERM_ROOM_SUBJECT 256
|
|
#define PERM_ROOM_NAME 512
|
|
#define PERM_ALL 1023
|
|
|
|
#endif // FLAGS_H
|