chanservaddcommand("bantimer", QCMD_AUTHED, 2, csc_dobantimer, "Shows or changes the time after which bans are removed.", "Usage: BANTIMER <channel> [<duration>]\nTo help keep channels clear of the clutter of too many bans, Q can automatically\nremove channel bans after a specified time. This command is used to alter that\ntime period, disable the feature, or show the current setting, where:\nchannel - the channel to use\nduration - how long to remove channel bans after. If duration is 0 then channel\n bans will not be automatically removed. If duration is not specified,\n the current setting will be displayed. Suffixes can m (minutes), \n h (hours), d (days), w (weeks), M (months) and y (years) can be used \n to specify the duration, for example 3d, 1w, 1h30m.\nViewing the current setting requires operator (+o) access on the named channel.\nChanging the setting requires master (+m) access on the named channel.\n");
chanservaddcommand("chanflags", QCMD_AUTHED, 2, csc_dochanflags, "Shows or changes the flags on a channel.", "Usage: CHANFLAGS <channel> [<changes>]\nShows or changes the status of channel flags, where:\nchannel - channel to use\nchanges - changes to apply to the channel flags in the usual +/- format, e.g. +c\n to set +c and -c to remove it.\nViewing the current flags requires operator (+o) access on the named channel.\nChanging the flags requires master (+m) access on the named channel.\nValid channel flags are:\n +a AUTOOP Automatically ops any user who has op access when they join the\n channel. Same effect as giving all ops the +a chanlev flag.\n +b BITCH Prevents users who don't have operator access on the channel\n from being opped (automatically deops them)\n +c AUTOLIMIT Enables automatic limit feature - updates the channel limit at\n regular intervals to keep a certain number of free spaces. This\n can mitigate the effect of join floods. See AUTOLIMIT.\n +e ENFORCE Enforces bans on the channel. Any user who is banned will be\n kicked automatically.\n +f FORCETOPIC Prevents channel ops from changing the topic. The SETTOPIC\n command must be used instead.\n +g AUTOVOICE Automatically voices any user who has voice access when they join\n the channel. Same effect as giving all voices the +g chanlev flag.\n +j JOINED Causes Q to remain on the channel. Cannot be removed.\n +k KNOWNONLY Any user who joins the channel who is not known (+k) will be kicked. \n Unless channel mode +i is set they will be banned as well.\n +p PROTECT Any user with voice (+v) or operator (+o) access will have that \n status enforced on the channel at all times. Same effect as giving\n all ops and voices the +p chanlev flag.\n +t TOPICSAVE Saves the topic when it changes. Such saved topics can be restored\n via settopic, or when the bot rejoins when a channel has been left\n empty.\n +v VOICEALL Automatically grants voice (+v) on the channel to any user who enters,\n unless they have quiet (+q) chanlev flag.\n +w WELCOME Sends the welcome message to users joining the channel. See WELCOME.\nNote: Previous versions of Q included the facility to enforce limits and keys using\n+k and +l chanflags. This functionality is now available via the CHANMODE command.\n");
chanservaddcommand("chanlev", QCMD_AUTHED, 3, csc_dochanlev, "Shows or modifies user access on a channel.", "Usage: CHANLEV <channel> [<user> [<change>]]\nDisplays or alters the access of known users on a channel, where:\nchannel - the channel to use\nuser - the user to list or modify. user can be specified as either an active\n nickname on the network or #accountname. If user is not specified then\n all known users are listed.\nchange - lists the flags to add or remove, with + to add or - to remove. For\n example, +ao to add a and o flags, or -gv to remove g and v flags. This \n can be used to add or remove users from the channel. If change is not\n specified then the current access of the named user is displayed.\nDisplaying known user information requires you to be known (+k) on the named channel.\nAdjusting flags for other users requires master (+m) access on the named channel.\nAdding or removing the +m flag for other users requires owner (+n) access on the \n named channel.\nYou may always remove your own flags, except +qdb flags (which are not visible to you).\nAdding or removing personal flags requires you to be known (+k) on the named channel.\nNote that channel owners (+n) can grant +n to channel masters but they must use \nthe GIVEOWNER command for this.\nThe access level flags determine which commands a user is allowed to use on a channel.\nHolding an access flag also grants access to any action requiring a lesser flag (e.g.\n+m users can perform actions requiring operator (+o) status even if they do not\nactually have +o set). The access flags are listed in descending order.\nValid flags are:\nAccess level flags - these control the user's overall privilege level on the channel:\n +n OWNER Can add or remove masters and all other flags (except personal flags)\n +m MASTER Can add or remove all access except master or owner\n +o OP Can get ops on the channel\n +v VOICE Can get voice on the channel\n +k KNOWN Known on the channel - can get invites to the channel via INVITE\nPunishment flags - these restrict the user on the channel in some way:\n +q DEVOICE Not allowed to be voiced on the channel\n +d DEOP Not allowed to be opped on the channel\n +b BANNED Banned from the channel\nExtra flags - these control specific behaviour on the channel:\n +a AUTOOP Ops the user automatically when they join the channel (the user \n must also hold +o in order to have this flag)\n +g AUTOVOICE Voices the user automatically when they join the channel (the \n user must also hold +v in order to have this flag)\n +p PROTECT If the user has +o or +v, this makes sure they will always have\n that status, they will be reopped/voiced if deopped/voiced\n +t TOPIC Can use SETTOPIC to alter the topic on the channel\nPersonal flags - these control user personal preferences and can only be changed\n by the user concerned. They are not visible to other users.\n +w NOWELCOME Prevents the welcome message being sent when you join the channel.\n +j AUTOINV Invites you to the channel automatically when you authenticate.\nNote that non-sensible combinations of flags are not allowed. After making a \nchange the current status of the named user on the channel will be confirmed.\n");
chanservaddcommand("bantimer", QCMD_AUTHED, 2, csc_dobantimer, "Shows or changes the time after which bans are removed.", "Usage: BANTIMER <channel> [<duration>]\nTo help keep channels clear of the clutter of too many bans, Q can automatically\nremove channel bans after a specified time. This command is used to alter that\ntime period, disable the feature, or show the current setting, where:\nchannel - the channel to use\nduration - how long to remove channel bans after. If duration is 0 then channel\n bans will not be automatically removed. If duration is not specified,\n the current setting will be displayed. Suffixes can m (minutes), \n h (hours), d (days), w (weeks), M (months) and y (years) can be used \n to specify the duration, for example 3d, 1w, 1h30m.\nViewing the current setting requires operator (+o) access on the named channel.\nChanging the setting requires master (+m) access on the named channel.\n");
chanservaddcommand("chanflags", QCMD_AUTHED, 2, csc_dochanflags, "Shows or changes the flags on a channel.", "Usage: CHANFLAGS <channel> [<changes>]\nShows or changes the status of channel flags, where:\nchannel - channel to use\nchanges - changes to apply to the channel flags in the usual +/- format, e.g. +c\n to set +c and -c to remove it.\nViewing the current flags requires operator (+o) access on the named channel.\nChanging the flags requires master (+m) access on the named channel.\nValid channel flags are:\n +a AUTOOP Automatically ops any user who has op access when they join the\n channel. Same effect as giving all ops the +a chanlev flag.\n +b BITCH Prevents users who don't have operator access on the channel\n from being opped (automatically deops them)\n +c AUTOLIMIT Enables automatic limit feature - updates the channel limit at\n regular intervals to keep a certain number of free spaces. This\n can mitigate the effect of join floods. See AUTOLIMIT.\n +e ENFORCE Enforces bans on the channel. Any user who is banned will be\n kicked automatically.\n +f FORCETOPIC Prevents channel ops from changing the topic. The SETTOPIC\n command must be used instead.\n +g AUTOVOICE Automatically voices any user who has voice access when they join\n the channel. Same effect as giving all voices the +g chanlev flag.\n +j JOINED Causes Q to remain on the channel. Cannot be removed.\n +k KNOWNONLY Any user who joins the channel who is not known (+k) will be kicked. \n Unless channel mode +i is set they will be banned as well.\n +p PROTECT Any user with voice (+v) or operator (+o) access will have that \n status enforced on the channel at all times. Same effect as giving\n all ops and voices the +p chanlev flag.\n +t TOPICSAVE Saves the topic when it changes. Such saved topics can be restored\n via settopic, or when the bot rejoins when a channel has been left\n empty.\n +v VOICEALL Automatically grants voice (+v) on the channel to any user who enters,\n unless they have quiet (+q) chanlev flag.\n +w WELCOME Sends the welcome message to users joining the channel. See WELCOME.\nNote: Previous versions of Q included the facility to enforce limits and keys using\n+k and +l chanflags. This functionality is now available via the CHANMODE command.\n");
chanservaddcommand("chanlev", QCMD_AUTHED, 3, csc_dochanlev, "Shows or modifies user access on a channel.", "Usage: CHANLEV <channel> [<user> [<change>]]\nDisplays or alters the access of known users on a channel, where:\nchannel - the channel to use\nuser - the user to list or modify. user can be specified as either an active\n nickname on the network or #accountname. If user is not specified then\n all known users are listed.\nchange - lists the flags to add or remove, with + to add or - to remove. For\n example, +ao to add a and o flags, or -gv to remove g and v flags. This \n can be used to add or remove users from the channel. If change is not\n specified then the current access of the named user is displayed.\nDisplaying known user information requires you to be known (+k) on the named channel.\nAdjusting flags for other users requires master (+m) access on the named channel.\nAdding or removing the +m flag for other users requires owner (+n) access on the \n named channel.\nYou may always remove your own flags, except +qdb flags (which are not visible to you).\nAdding or removing personal flags requires you to be known (+k) on the named channel.\nNote that channel owners (+n) can grant +n to channel masters but they must use \nthe GIVEOWNER command for this.\nThe access level flags determine which commands a user is allowed to use on a channel.\nHolding an access flag also grants access to any action requiring a lesser flag (e.g.\n+m users can perform actions requiring operator (+o) status even if they do not\nactually have +o set). The access flags are listed in descending order.\nValid flags are:\nAccess level flags - these control the user's overall privilege level on the channel:\n +n OWNER Can add or remove masters and all other flags (except personal flags)\n +m MASTER Can add or remove all access except master or owner\n +o OP Can get ops on the channel\n +v VOICE Can get voice on the channel\n +k KNOWN Known on the channel - can get invites to the channel via INVITE\nPunishment flags - these restrict the user on the channel in some way:\n +q DEVOICE Not allowed to be voiced on the channel\n +d DEOP Not allowed to be opped on the channel\n +b BANNED Banned from the channel\nExtra flags - these control specific behaviour on the channel:\n +a AUTOOP Ops the user automatically when they join the channel (the user \n must also hold +o in order to have this flag)\n +g AUTOVOICE Voices the user automatically when they join the channel (the \n user must also hold +v in order to have this flag)\n +p PROTECT If the user has +o or +v, this makes sure they will always have\n that status, they will be reopped/voiced if deopped/voiced\n +t TOPIC Can use SETTOPIC to alter the topic on the channel\nPersonal flags - these control user personal preferences and can only be changed\n by the user concerned. They are not visible to other users.\n +w NOWELCOME Prevents the welcome message being sent when you join the channel.\n +j AUTOINV Invites you to the channel automatically when you authenticate.\nNote that non-sensible combinations of flags are not allowed. After making a \nchange the current status of the named user on the channel will be confirmed.\n");