diff options
author | Andrew Potter <agpotter@gmail.com> | 2023-01-29 16:43:20 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-01-29 16:50:57 +0100 |
commit | 4f0b6115a149b134b4a0cff3051b452ebe6dfdc1 (patch) | |
tree | 5186b3c52331bc045f20b8d38ed70bd021da66ff /src/plugins/irc/irc-server.h | |
parent | 3909d7761732f2bab8834be0a3c7783d4d2427de (diff) | |
download | weechat-4f0b6115a149b134b4a0cff3051b452ebe6dfdc1.zip |
irc: add server option "registered_mode" (closes #1625)
Two new fields are added in IRC server structure:
- "authentication_method", possible values:
0: not authenticated
1: authenticated with SASL
2: authenticated with other method
- "sasl_mechanism_used", possible values: see enum t_irc_sasl_mechanism
in src/plugins/irc/irc-sasl.h
Diffstat (limited to 'src/plugins/irc/irc-server.h')
-rw-r--r-- | src/plugins/irc/irc-server.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-server.h b/src/plugins/irc/irc-server.h index 0a9fa25a3..7ac282a8f 100644 --- a/src/plugins/irc/irc-server.h +++ b/src/plugins/irc/irc-server.h @@ -94,6 +94,7 @@ enum t_irc_server_option IRC_SERVER_OPTION_SPLIT_MSG_MAX_LENGTH, /* max length of messages */ IRC_SERVER_OPTION_CHARSET_MESSAGE, /* what to decode/encode in msg */ IRC_SERVER_OPTION_DEFAULT_CHANTYPES, /* chantypes if not received */ + IRC_SERVER_OPTION_REGISTERED_MODE, /* mode set on registered user */ /* number of server options */ IRC_SERVER_NUM_OPTIONS, }; @@ -153,6 +154,14 @@ enum t_irc_server_utf8mapping IRC_SERVER_NUM_UTF8MAPPING, }; +/* authentication method */ +enum t_irc_server_auth_method +{ + IRC_SERVER_AUTH_METHOD_NONE = 0, + IRC_SERVER_AUTH_METHOD_SASL, + IRC_SERVER_AUTH_METHOD_OTHER, +}; + /* output queue of messages to server (for sending slowly to server) */ struct t_irc_outqueue @@ -200,6 +209,8 @@ struct t_irc_server char *sasl_scram_auth_message; /* auth message for SASL SCRAM */ char *sasl_temp_username; /* temp SASL username (set by /auth cmd) */ char *sasl_temp_password; /* temp SASL password (set by /auth cmd) */ + int authentication_method; /* authentication method used to login */ + int sasl_mechanism_used; /* SASL method used at login time */ int is_connected; /* 1 if WeeChat is connected to server */ int ssl_connected; /* = 1 if connected with SSL */ int disconnected; /* 1 if server has been disconnected */ |