You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently client-side channels are "Twitch" channels for isTwitchChannel and have Twitch in the channel type enum. However they cannot be cast to TwitchChannel.
We should rework channel types, to resolve the type >= Twitch && type < TwitchEnd but can't be cast to TwitchChannel problem.
enumclassType {
None, // Unused? empty?
Direct, // Actually indirect channel, not sure where it's used though
Twitch, // Normal Twitch channel like #pajlada// can execute commands, but not send messages, there are no moderator privileges, no vips, no broadcasters,// no stream titles, ...
TwitchWhispers,
TwitchWatching,
TwitchMentions, // this could be made into a generic channel, there is no point of it being Twitch specifically, it's not a TwitchChannel anyway.
TwitchLive,
TwitchAutomod,
TwitchEnd,
Misc, // this is for local testing channels, can be left as is
};
The minimal modifications here would be:
enumclassType {
None,
Direct,
Twitch, // Normal Twitch channel like #pajlada
Whispers,
Watching,
Mentions,
Live,
Automod,
Misc, // this is for local testing channels, can be left as is
};
// make Channel::isTwitchChannel into:boolChannel::isTwitchChannel() const {
returnthis->type_ == Channel::Type::Twitch;
}
There was an idea where instead of having an enum for a channel we instead would have some kind of flags for what traits supports, ex:
enum ChannelFlags {
PERMISSIONS = (1 << 0), // mods, vips, ...
TWITCH_COMMANDS = (1<<1), // allow for /w and friends to run
LOCAL = (1<<2),
STREAM_TITLE = (1<<3),
INDIRECT = (1<<4), // collects messages from more than one other channel,
// this could be used to add channel links at the start of messages (like /mentions)
};
Checklist
Describe your issue
Currently client-side channels are "Twitch" channels for
isTwitchChannel
and haveTwitch
in the channel type enum. However they cannot be cast toTwitchChannel
.We should rework channel types, to resolve the
type >= Twitch && type < TwitchEnd
but can't be cast toTwitchChannel
problem.The minimal modifications here would be:
There was an idea where instead of having an enum for a channel we instead would have some kind of flags for what traits supports, ex:
Channel types would then be:
None
LOCAL
Direct
LOCAL
INDIRECT
flag,Twitch
PERMISSIONS+TWITCH_COMMANDS+STREAM_TITLE
TwitchWhispers
LOCAL+TWITCH_COMMANDS
TwitchWatching
LOCAL+TWITCH_COMMANDS
TwitchMentions
LOCAL+INDIRECT
TwitchLive
LOCAL
TwitchAutomod
LOCAL+INDIRECT
TwitchEnd
Misc
LOCAL
Screenshots
No response
OS and Chatterino Version
commit 5b1ce32 (HEAD -> master, origin/master, origin/HEAD)
The text was updated successfully, but these errors were encountered: