controlpanel: Username for GET is optional, but for SET is mandatory. #844

Open
opened 2026-10-05 04:48:18 +02:00 by adam · 0 comments
Owner
(13:26:36) <*controlpanel> +--------------------------------------------------------+-------------------------------------------------+
(13:26:36) <*controlpanel> | Command                                                | Description                                     |
(13:26:36) <*controlpanel> +--------------------------------------------------------+-------------------------------------------------+
(13:26:36) <*controlpanel> | Set <variable> <username> <value>                      | Sets the variable's value for the given user    |
(13:26:36) <*controlpanel> | SetChan <variable> <username> <network> <chan> <value> | Sets the variable's value for the given channel |
(13:26:36) <*controlpanel> | SetNetwork <variable> <username> <network> <value>     | Sets the variable's value for the given network |
(13:26:36) <*controlpanel> +--------------------------------------------------------+-------------------------------------------------+
(13:26:36) <*controlpanel> The following variables are available when using the Set/Get commands:
(13:26:36) <*controlpanel> +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
(13:26:36) <*controlpanel> | Type                 | Variables                                                                                                                                                     |
(13:26:36) <*controlpanel> +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
(13:26:36) <*controlpanel> | Boolean (true/false) | MultiClients, DebugMode, DenyLoadMod, DenySetBindHost, AutoClearChanBuffer, AutoClearQueryBuffer, Admin, AppendTimestamp, PrependTimestamp, AuthOnlyViaModule |
(13:26:36) <*controlpanel> | Integer              | ChanBufferSize, QueryBufferSize, JoinTries, MaxJoins, MaxNetworks, MaxQueryBuffers                                                                            |
(13:26:36) <*controlpanel> | String               | Nick, Altnick, Ident, RealName, BindHost, DefaultChanModes, QuitMsg, Password, Timezone, TimestampFormat, DCCBindHost, StatusPrefix                           |
(13:26:36) <*controlpanel> +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
(13:26:41) <zarthus_> help get
(13:26:42) <*controlpanel> +------------------------------------------------+-----------------------------------------------------------+
(13:26:42) <*controlpanel> | Command                                        | Description                                               |
(13:26:42) <*controlpanel> +------------------------------------------------+-----------------------------------------------------------+
(13:26:42) <*controlpanel> | Get <variable> [username]                      | Prints the variable's value for the given or current user |
(13:26:42) <*controlpanel> | GetChan <variable> [username] <network> <chan> | Prints the variable's value for the given channel         |
(13:26:42) <*controlpanel> | GetNetwork <variable> [username] [network]     | Prints the variable's value for the given network         |
(13:26:42) <*controlpanel> +------------------------------------------------+-----------------------------------------------------------+

This issue is a bit of a mixed bag; because I'm not sure what the best solution is. In one way this is sane behaviour because if you forget the parameter you might accidentally override your own settings. Similarily, for GetChan this syntax just makes no sense at all.

``` (13:26:36) <*controlpanel> +--------------------------------------------------------+-------------------------------------------------+ (13:26:36) <*controlpanel> | Command | Description | (13:26:36) <*controlpanel> +--------------------------------------------------------+-------------------------------------------------+ (13:26:36) <*controlpanel> | Set <variable> <username> <value> | Sets the variable's value for the given user | (13:26:36) <*controlpanel> | SetChan <variable> <username> <network> <chan> <value> | Sets the variable's value for the given channel | (13:26:36) <*controlpanel> | SetNetwork <variable> <username> <network> <value> | Sets the variable's value for the given network | (13:26:36) <*controlpanel> +--------------------------------------------------------+-------------------------------------------------+ (13:26:36) <*controlpanel> The following variables are available when using the Set/Get commands: (13:26:36) <*controlpanel> +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ (13:26:36) <*controlpanel> | Type | Variables | (13:26:36) <*controlpanel> +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ (13:26:36) <*controlpanel> | Boolean (true/false) | MultiClients, DebugMode, DenyLoadMod, DenySetBindHost, AutoClearChanBuffer, AutoClearQueryBuffer, Admin, AppendTimestamp, PrependTimestamp, AuthOnlyViaModule | (13:26:36) <*controlpanel> | Integer | ChanBufferSize, QueryBufferSize, JoinTries, MaxJoins, MaxNetworks, MaxQueryBuffers | (13:26:36) <*controlpanel> | String | Nick, Altnick, Ident, RealName, BindHost, DefaultChanModes, QuitMsg, Password, Timezone, TimestampFormat, DCCBindHost, StatusPrefix | (13:26:36) <*controlpanel> +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ (13:26:41) <zarthus_> help get (13:26:42) <*controlpanel> +------------------------------------------------+-----------------------------------------------------------+ (13:26:42) <*controlpanel> | Command | Description | (13:26:42) <*controlpanel> +------------------------------------------------+-----------------------------------------------------------+ (13:26:42) <*controlpanel> | Get <variable> [username] | Prints the variable's value for the given or current user | (13:26:42) <*controlpanel> | GetChan <variable> [username] <network> <chan> | Prints the variable's value for the given channel | (13:26:42) <*controlpanel> | GetNetwork <variable> [username] [network] | Prints the variable's value for the given network | (13:26:42) <*controlpanel> +------------------------------------------------+-----------------------------------------------------------+ ``` This issue is a bit of a mixed bag; because I'm not sure what the best solution is. In one way this is sane behaviour because if you forget the parameter you might accidentally override your own settings. Similarily, for GetChan this syntax just makes no sense at all. <!-- github-sync-id:328736692 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#844