purple: Add a way to access the account password
This commit is contained in:
@@ -39,6 +39,17 @@ impl<P> RegisterContext<P> {
|
||||
self.info.actions = Some(entrypoints::actions);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_password(mut self) -> Self {
|
||||
// purple_sys defaults extra_info.options to contain:
|
||||
// OPT_PROTO_NO_PASSWORD | OPT_PROTO_IM_IMAGE | OPT_PROTO_CHAT_TOPIC
|
||||
// All we have to do is remove the no_password one.
|
||||
self.extra_info.options =
|
||||
purple_sys::PurpleProtocolOptions::OPT_PROTO_IM_IMAGE |
|
||||
purple_sys::PurpleProtocolOptions::OPT_PROTO_CHAT_TOPIC;
|
||||
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
pub struct PrplPluginLoader<P: PrplPlugin>(*mut purple_sys::PurplePlugin, PhantomData<P>);
|
||||
|
Reference in New Issue
Block a user