Add usermode +x and channelmode +r
This commit adds the usermode +x (masked hostname) and the channelmode +r (entry for users registered with NickServ only)
This commit is contained in:
parent
e822170af2
commit
98371429b6
1 changed files with 8 additions and 0 deletions
|
@ -30,6 +30,8 @@ pub enum UserMode {
|
||||||
LocalOper,
|
LocalOper,
|
||||||
/// s - marks a user for receipt of server notices
|
/// s - marks a user for receipt of server notices
|
||||||
ServerNotices,
|
ServerNotices,
|
||||||
|
/// x - masked hostname
|
||||||
|
MaskedHost,
|
||||||
|
|
||||||
/// Any other unknown-to-the-crate mode.
|
/// Any other unknown-to-the-crate mode.
|
||||||
Unknown(char),
|
Unknown(char),
|
||||||
|
@ -57,6 +59,7 @@ impl UserMode {
|
||||||
'o' => Oper,
|
'o' => Oper,
|
||||||
'O' => LocalOper,
|
'O' => LocalOper,
|
||||||
's' => ServerNotices,
|
's' => ServerNotices,
|
||||||
|
'x' => MaskedHost,
|
||||||
_ => Unknown(c),
|
_ => Unknown(c),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -74,6 +77,7 @@ impl fmt::Display for UserMode {
|
||||||
Oper => 'o',
|
Oper => 'o',
|
||||||
LocalOper => 'O',
|
LocalOper => 'O',
|
||||||
ServerNotices => 's',
|
ServerNotices => 's',
|
||||||
|
MaskedHost => 'x',
|
||||||
Unknown(c) => c,
|
Unknown(c) => c,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -96,6 +100,8 @@ pub enum ChannelMode {
|
||||||
Key,
|
Key,
|
||||||
/// m - channel is in moderated mode
|
/// m - channel is in moderated mode
|
||||||
Moderated,
|
Moderated,
|
||||||
|
/// r - entry for registered users only
|
||||||
|
RegisteredOnly,
|
||||||
/// s - channel is hidden from listings
|
/// s - channel is hidden from listings
|
||||||
Secret,
|
Secret,
|
||||||
/// t - require permissions to edit topic
|
/// t - require permissions to edit topic
|
||||||
|
@ -146,6 +152,7 @@ impl ChannelMode {
|
||||||
'I' => InviteException,
|
'I' => InviteException,
|
||||||
'k' => Key,
|
'k' => Key,
|
||||||
'm' => Moderated,
|
'm' => Moderated,
|
||||||
|
'r' => RegisteredOnly,
|
||||||
's' => Secret,
|
's' => Secret,
|
||||||
't' => ProtectedTopic,
|
't' => ProtectedTopic,
|
||||||
'n' => NoExternalMessages,
|
'n' => NoExternalMessages,
|
||||||
|
@ -171,6 +178,7 @@ impl fmt::Display for ChannelMode {
|
||||||
InviteException => 'I',
|
InviteException => 'I',
|
||||||
Key => 'k',
|
Key => 'k',
|
||||||
Moderated => 'm',
|
Moderated => 'm',
|
||||||
|
RegisteredOnly => 'r',
|
||||||
Secret => 's',
|
Secret => 's',
|
||||||
ProtectedTopic => 't',
|
ProtectedTopic => 't',
|
||||||
NoExternalMessages => 'n',
|
NoExternalMessages => 'n',
|
||||||
|
|
Loading…
Add table
Reference in a new issue