Combine Ban/Timeout pubsub actions
Fully implement PubSub ban/unban messages Move the "message combining" to Channel::addMessage Disable "irc" ban/timeout handling for now. In the future, we might want to use this if you're not a moderator in a channel.
This commit is contained in:
@@ -46,21 +46,19 @@ struct ModeChangedAction : PubSubAction {
|
||||
} args;
|
||||
};
|
||||
|
||||
struct TimeoutAction : PubSubAction {
|
||||
using PubSubAction::PubSubAction;
|
||||
|
||||
ActionUser target;
|
||||
|
||||
QString reason;
|
||||
uint32_t duration;
|
||||
};
|
||||
|
||||
struct BanAction : PubSubAction {
|
||||
using PubSubAction::PubSubAction;
|
||||
|
||||
ActionUser target;
|
||||
|
||||
QString reason;
|
||||
|
||||
uint32_t duration = 0;
|
||||
|
||||
bool isBan() const
|
||||
{
|
||||
return this->duration == 0;
|
||||
}
|
||||
};
|
||||
|
||||
struct UnbanAction : PubSubAction {
|
||||
@@ -72,6 +70,11 @@ struct UnbanAction : PubSubAction {
|
||||
Banned,
|
||||
TimedOut,
|
||||
} previousState;
|
||||
|
||||
bool wasBan() const
|
||||
{
|
||||
return this->previousState == Banned;
|
||||
}
|
||||
};
|
||||
|
||||
struct ClearChatAction : PubSubAction {
|
||||
|
||||
Reference in New Issue
Block a user