Ind 945 Posted March 31, 2013 (edited) Introducing Hercules' Channel SystemHello~! - What?! 1st, it is a replacement for the old @main 2nd, it is a super ultra mega improvement compared to the functionality @main provided. 3rd, whops. there is no 3rd. channels.conf format /* default channels (available on boot) */ default_channels: { /* channel_name : channel_messages_color */ main: "Orange" /* available as #main */ support: "Blue" /* available as #support */ trade: "Red" /* available as #trade */ offtopic: "Cyan" /* available as #offtopic */ /* as many channels as you like */ } /* colors available */ colors: { Default: "0xffffff" /* custom channels will use the first in the list unless a font is selected thru @channel */ Red: "0xff0000" Blue: "0x83cfe9" Orange: "0xe57c00" Cyan: "0x00b89d" Yellow: "0xffff90" Green: "0x28bf00" Normal: "0x00ff00" /* as many colors as you like */ } /* allow users to create their own (private) channels through @channels command? */ /* (must also allow players to use @channels in groups.conf) */ allow_user_channel_creation: true /* "map_local_channel" is a instanced channel unique to each map */ map_local_channel: true map_local_channel_name: "map" /* available as #map */ map_local_channel_color: "Yellow" map_local_channel_autojoin: true /* can disable autojoin in specific maps through mapflag or zone: nomapchannelautojoin */ /* "ally_channel" is a channel shared by all your guild allies */ ally_channel_enabled: true ally_channel_name: "ally" /* available as #ally */ ally_channel_color: "Green" ally_channel_autojoin: true Notes on the format/configuration default_channels is the list of reboot-persistent channels, you can setup as many as you like and each can have its own color for chat, which you can specify in colors (again, you can setup as many as you like) map_local_channel is a feature that grants each map its own instanced channel (available, by default as #map -- which can be changed as per map_local_channel_name) map_local_channel_autojoin whether users will autojoin the local channel when they load a map with it enabled map_local_channel_autojoin can be disabled on selected maps (e.g. if you dont want it on gvg maps) through a mapflag (with a horribly long name D:) '<map name><tab>mapflag<tab>nomapchannelautojoin' ally_channel_enabled is a feature that grants a instanced channel for each guild's allies (as well as their own members), available by default as #ally -- which can be changed as per map_local_channel_name ally_channel_autojoin whether users will autojoin their respective ally chats upon login. New Commands Explained @join Simple: @join <#channel_name>or, for password-protected rooms: @join <#channel_name> <password> @channel Does a number of things. Create a new channel (option available as long as allow_user_channel_creation is enabled) @channel create <#channel_name> <password> List public channels (groups with hchsys_admin can view private channels as well) @channel list Change a channel's color (requires to be owner of said channel or be in a group with hchsys_admin permission) @channel setcolor Samples available colors and displays their keys/names @channel list colors Leaves a specific channel @channel leave <#channel_name> Binds your global chat to a specific channel, making everything you type that'd normally be displayed to nearby characters be redirected to that channel instead @channel bindto <#channel_name> Unbinds your global chat from the current (if any) binded channel @channel unbind Bans a specific character from a channel @channel ban <#channel name> <character name> Lists all banned characters from a channel (groups with channel system admin permission can also see their account id) @channel banlist <#channel name> Unbans a specific character from a channel @channel unban <#channel name> <character name> Changes a channel's options (for now, channel message delay and announce-when-someone-joins) @channel setopt <#channel name> <option name> <option value> How to speak in a #channel You can either bind a channel to your global chat (see @channel bindto above) or PM the channel you want to speak to, if you attempt to send a pm to a non-password protected channel that you have not joined, you'll autojoin. Other stuff as I coded this feature I also improved overall guild processing/lookup, extremely, extremely faster (did I already say its ridiculously faster? WoE overhead probably more than halved with this). over a hundred lookups were replaced by a cached guild state that takes only 4~8 bytes per player. The commit also fixed a "wearing-garment-removed-costume-garment-look" bug - special thanks to jTynne for letting me know~! Groups with channel admin permission can bypass the channel message delay Special Thanks to Streusel for proposing an idea that'd end up as the @channel bindto feature. to Frost for proposing the per-channel message delay limitation to Fatalis for proposing what'd end up as the @channel ban, @channel unban and @channel unbanall to Zopokx for proposing an improvement to how the map/local channels function Links~! Commit Commit (update) Edited February 7, 2017 by Ridley 15 fourxhackd, Jguy, mkbu95 and 12 others reacted to this Quote Share this post Link to post Share on other sites
Eurydice 8 Posted March 31, 2013 And you did this in one day. o/ Quote Share this post Link to post Share on other sites
jTynne 101 Posted March 31, 2013 I will birth your children like a male seahorse, Ind. /zomg Thank you! Quote Share this post Link to post Share on other sites
Mystery 594 Posted March 31, 2013 This is so awesome! You did good Ind! Quote Share this post Link to post Share on other sites
Igniz 8 Posted March 31, 2013 Ind for president! Quote Share this post Link to post Share on other sites
frenzmu06 5 Posted March 31, 2013 another good implementation... good? i mean ZOMYGOODNESS Quote Share this post Link to post Share on other sites
Fatalis 2 Posted March 31, 2013 What the! you are a legend ind! Quote Share this post Link to post Share on other sites
Jedzkie 58 Posted March 31, 2013 (edited) @Ind Can i suggest to add this in the system? in @channel create, can you add a limit of users in the channel? eg: @channel create <name><pass><no. of users> Thank you! EDIT: Suggest no. 2: Can you add also a time interval on every messages to preventing spamming? Edited April 1, 2013 by Frost 1 Zopokx reacted to this Quote Share this post Link to post Share on other sites
Ind 945 Posted April 1, 2013 Suggest no. 2: Can you add also a time interval on every messages to preventing spamming?it makes use of the existent config on chat delay if (battle_config.min_chat_delay) { if (DIFF_TICK(sd->cantalk_tick, gettick()) > 0) { return; } sd->cantalk_tick = gettick() + battle_config.min_chat_delay; }as for your other suggestion im not sure the benefits, can you elaborate o-o? Quote Share this post Link to post Share on other sites
Jedzkie 58 Posted April 1, 2013 For example if i created a channel, i can set how many user are able to join my channel, if i set to 10, only the first 10 users can join my created channel. Quote Share this post Link to post Share on other sites
Fatalis 2 Posted April 4, 2013 Suggest no. 2: Can you add also a time interval on every messages to preventing spamming?it makes use of the existent config on chat delay if (battle_config.min_chat_delay) { if (DIFF_TICK(sd->cantalk_tick, gettick()) > 0) { return; } sd->cantalk_tick = gettick() + battle_config.min_chat_delay; }as for your other suggestion im not sure the benefits, can you elaborate o-o? where i gonna add this? Quote Share this post Link to post Share on other sites
Ind 945 Posted April 4, 2013 you dont add it, its already there. Quote Share this post Link to post Share on other sites
Fatalis 2 Posted April 6, 2013 (edited) you dont add it, its already there. It's nice if you add a @channel ban <channel name> <name of char> and @channel banall <name of char> [ he will get ban all channels and can't create a channel also] ofcourse @channel unbanall/unban Edited April 6, 2013 by Fatalis Quote Share this post Link to post Share on other sites
Ind 945 Posted April 6, 2013 you dont add it, its already there.It's nice if you add a @channel ban <channel name> <name of char> and @channel banall <name of char> [ he will get ban all channels and can't create a channel also] ofcourse @channel unbanall/unban Very interesting. indeed it lacks the ability to kick/ban, that'd be nice. Quote Share this post Link to post Share on other sites
Fatalis 2 Posted April 7, 2013 you dont add it, its already there.It's nice if you add a @channel ban <channel name> <name of char> and @channel banall <name of char> [ he will get ban all channels and can't create a channel also] ofcourse @channel unbanall/unban Very interesting. indeed it lacks the ability to kick/ban, that'd be nice. is the channel system is now fully working? no crash? cuz last time i use it it getting my server crash Quote Share this post Link to post Share on other sites
Ind 945 Posted April 7, 2013 you dont add it, its already there.It's nice if you add a @channel ban <channel name> <name of char> and @channel banall <name of char> [ he will get ban all channels and can't create a channel also] ofcourse @channel unbanall/unban Very interesting. indeed it lacks the ability to kick/ban, that'd be nice. is the channel system is now fully working? no crash? cuz last time i use it it getting my server crash we have no knowledge of any unfixed crashes, if you crash let we know through a bug report. Quote Share this post Link to post Share on other sites
Zopokx 7 Posted April 10, 2013 It's possible have the 'You're now in the '#%s' channel for '%s' (1435)' message in the chat but remove it from above user head? How could be done? I think it is a bit disturbing everytime you change map. Quote Share this post Link to post Share on other sites
Ind 945 Posted April 10, 2013 hmmm yes its possible and indeed that is a disturbing thing Quote Share this post Link to post Share on other sites
Ind 945 Posted April 12, 2013 Hercules Channel System Update New Commands Explained [*]@channel [*]Bans a specific character from a channel @channel ban <#channel name> <character name> [*]Lists all banned characters from a channel (groups with channel system admin permission can also see their account id) @channel banlist <#channel name> [*]Unbans a specific character from a channel @channel unban <#channel name> <character name> [*]Changes a channel's options (for now, channel message delay and announce-when-someone-joins) @channel setopt <#channel name> <option name> <option value> Other stuff [*]Groups with channel admin permission can bypass the channel message delay Special Thanks [*]to Frost for proposing the per-channel message delay limitation [*]to Fatalis for proposing what'd end up as the @channel ban, @channel unban and @channel unbanall [*]to Zopokx for proposing an improvement to how the map/local channels function 5 Fatalis, kyeme, JulioCF and 2 others reacted to this Quote Share this post Link to post Share on other sites
REKT 10 Posted April 12, 2013 I liked this community! 1 Judas reacted to this Quote Share this post Link to post Share on other sites
Eurydice 8 Posted April 12, 2013 Yay thanks for the update Indbb! Quote Share this post Link to post Share on other sites
kami-shi 26 Posted April 19, 2013 This is a great feature. Quote Share this post Link to post Share on other sites