diff options
author | dequis <dx@dxzone.com.ar> | 2016-11-13 21:37:14 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2016-11-13 21:37:14 -0300 |
commit | 9f03c472fef309878ff2f3bc720d51e6d03077f1 (patch) | |
tree | b49d1be8c2e870e39432a3a9fc5cc41086ade894 /root_commands.c | |
parent | ea902752503fc5b356d6513911081ec932d804f2 (diff) |
Improve support for protocols which don't require a password
This adds a prpl_options_t enum with flags, which mostly just brings
OPT_PROTO_{NO_PASSWORD,PASSWORD_OPTIONAL} from libpurple as
PRPL_OPT_{NO_PASSWORD,PASSWORD_OPTIONAL}
Diffstat (limited to 'root_commands.c')
-rw-r--r-- | root_commands.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/root_commands.c b/root_commands.c index d4b278c4..732949d8 100644 --- a/root_commands.c +++ b/root_commands.c @@ -469,6 +469,13 @@ static void cmd_account(irc_t *irc, char **cmd) *a->pass = '\0'; irc_rootmsg(irc, "No need to enter a password for this " "account since it's using OAuth"); + } else if (prpl->options & PRPL_OPT_NO_PASSWORD) { + *a->pass = '\0'; + } else if (prpl->options & PRPL_OPT_PASSWORD_OPTIONAL) { + *a->pass = '\0'; + irc_rootmsg(irc, "Passwords are optional for this account. " + "If you wish to enter the password with /OPER, do " + "account %s set -del password", a->tag); } else { irc_rootmsg(irc, "You can now use the /OPER command to " "enter the password"); @@ -478,6 +485,8 @@ static void cmd_account(irc_t *irc, char **cmd) "set oauth on", a->tag); } } + } else if (prpl->options & PRPL_OPT_NO_PASSWORD) { + irc_rootmsg(irc, "Note: this account doesn't use password for login"); } return; |