diff --git a/conf/channels.conf b/conf/channels.conf index 5930531c0d..4df4b9dd71 100644 --- a/conf/channels.conf +++ b/conf/channels.conf @@ -1,16 +1,5 @@ // Channel System Configuration File - -chsys: ( -{ - /* Default channels (available to all players) */ - default_channels: { - /* channel_name : channel_messages_color */ - main: "Yellow" - support: "Blue" - trade: "Red" - chat: "Default" - /* Add as many channels as you'd like. */ - } +channel_config: { /* Colors available */ colors: { @@ -21,24 +10,112 @@ chsys: ( Cyan: "0x00b89d" Yellow: "0xffff90" Green: "0x28bf00" + White: "0xFFFFFF" + Purple: "0xD67FFF" + LightGreen: "0xB6FF00" Normal: "0x00ff00" /* Add as many colors as you'd like. */ } - /* Allow users to create their own (private) channels through @channel command? */ - /* (must also allow players to use @channel in groups.conf) */ - allow_user_channel_creation: true + /** + * Private channel config + * - Always CHAN_TYPE_PUBLIC + * - Always displayed in chat log as "#channel_name: : " + * - ID of private channels start at 1000 + **/ + private_channel: { + allow: true // (bool) Allow player to create their own channel? + color: "Default" // (string) Default color, see colors + delay: 1000 // (int) Chat delay for each member + max_member: 1000 // (int) Max members + self_notif: true // (bool) Show message when player enters or leaves the channel + join_notif: false // (bool) Show message when player joined the channel + leave_notif: false // (bool) Show message when player leaves the channel + /* Moderation feature for channel owner, allowed to: */ + ban: true // (bool) Ban players + kick: true // (bool) Kick players + color_override: false // (bool) Allow players to change the private channel color to their own + change_delay: false // (bool) Allow players to change the private channel delay to their own + } - /* "map_local_channel" is an instanced channel unique to each map. */ - map_local_channel: false - map_local_channel_name: "map" - map_local_channel_color: "Yellow" - map_local_channel_autojoin: true /* Disable autojoin in specific maps through mapflag 'nomapchannelautojoin'. */ + /** + * Default server channels + **/ + channels: ( + /** + * Structure + { + name: "#channel" // (string) Channel name + password: "" // (string) Channel password + alias: "[Channel]" // (string) Message from this that channel will be displayed instead the channel name + color: "Default" // (string) Channel color + type: "CHAN_TYPE_PUBLIC" // (string) Channel type: CHAN_TYPE_PUBLIC, CHAN_TYPE_ALLY, CHAN_TYPE_MAP + autojoin: false // (bool) Players will auto join channel + delay: 1000 // (int) Chat delay for each player + leave: true // (bool) Player is allowed to leave the channel + chat: true // (bool) Player is allowed to chat on this channel + color_override: false // (bool) Allow players to change the private channel color to their own + self_notif: true // (bool) Show message when player enters or leaves the channel + join_notif: false // (bool) Show message when player joined the channel + leave_notif: false // (bool) Show message when player leaves the channel + groupid: (0,..,99) // (list,int) Only players with valid group IDs are allowed to join. Group with 'channel_admin' can always enter the channel. + /// All values above are default settings + }, // Use comma if followed by other channel + **/ + { + name: "#global" + alias: "[Global]" + color: "White" + type: "CHAN_TYPE_PUBLIC" + delay: 1000 + autojoin: false + leave: false + }, + { + name: "#support" + alias: "[Support]" + color: "Blue" + type: "CHAN_TYPE_PUBLIC" + delay: 1000 + autojoin: false + }, + { + name: "#trade" + alias: "[Trade]" + color: "LightGreen" + type: "CHAN_TYPE_PUBLIC" + delay: 1000 + autojoin: false + } + ) - /* "ally_channel" is a channel shared by all your guild allies. */ - ally_channel_enabled: true - ally_channel_name: "ally" - ally_channel_color: "Green" - ally_channel_autojoin: true + /** + * Channel config for guild alliance + * For the structure, see the 'channels' above + **/ + ally: { + name: "#ally" + alias: "[Ally]" + color: "Green" + type: "CHAN_TYPE_ALLY" // DO NOT CHANGE THIS VALUE + delay: 1000 + autojoin: false + leave: true + chat: true + } + + /** + * Channel config for map channel + * For the structure, see the 'channels' above + **/ + map: { + name: "#map" + alias: "[Map]" + color: "Yellow" + type: "CHAN_TYPE_MAP" // DO NOT CHANGE THIS VALUE + delay: 1000 + autojoin: false + leave: true + chat: true + } } -) diff --git a/conf/map_athena.conf b/conf/map_athena.conf index 5df09c33b2..8c2a56522a 100644 --- a/conf/map_athena.conf +++ b/conf/map_athena.conf @@ -119,6 +119,9 @@ help_txt: conf/help.txt help2_txt: conf/help2.txt charhelp_txt: conf/charhelp.txt +// Load channel config from +channel_conf: conf/channels.conf + // Maps: import: conf/maps_athena.conf diff --git a/conf/msg_conf/map_msg.conf b/conf/msg_conf/map_msg.conf index f36fda93a1..402ac1a38c 100644 --- a/conf/msg_conf/map_msg.conf +++ b/conf/msg_conf/map_msg.conf @@ -812,7 +812,20 @@ 758: Baby Gunslinger 759: Baby Rebellion -//760-899 free +// Channel System +760: You cannot join channel '%s'. Limit of %d has been met. +761: %s %s has joined. +762: You cannot leave channel '%s'. +763: %s %s left. +764: You cannot change the color for channel '%s'. +765: You're not allowed to ban a player. +766: You cannot kick a player from channel '%s'. +767: You're not allowed to kick a player. +768: %s %s has been kicked. +769: %s %s has been banned. +770: %s %s has been unbanned. + +//771-899 free //------------------------------------ // More atcommands message diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 5436b35063..c2b02b3bd0 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -1,4 +1,4 @@ -//===== rAthena Documentation ================================ +//===== rAthena Documentation ================================ //= rAthena Script Commands //===== By: ================================================== //= rAthena Dev Team @@ -1033,6 +1033,7 @@ From here on, we will have the commands sorted as follow: 11.- Homunculus commands. 12.- Mercenary commands. 13.- Party commands. +14.- Channel commands. ===================== |1.- Basic commands.| @@ -9444,3 +9445,159 @@ else false if the leave failed. If is specified, the specified player is used rather than the attached one. --------------------------------------- + +======================== +|14.- Channel commands.| +======================== +--------------------------------------- + +*channel_create "",""{,""{