-- chat_configurator - Override behavior for chat configuration -- (component of Chat System) -- Template attachment: chat_system -- Created by: Patrick Ferland -- Created on: 05/27/2008 -- Revision History -- 05/27/2008 P.Ferland - New script -- 05/30/2008 P.Ferland - Initial release -- 06/02/2008 P.Ferland - Cleanup and documentation -- 06/05/2008 P.Ferland - Moved toolbar configuration to chat_toolbar script/module -- 06/13/2008 P.Ferland - Allowed use of min and max abbreviations in config -- 08/08/2008 P.Ferland - Updated configuration logic -- 10/08/2008 P.Ferland - OX friendliness pass -- 10/30/2008 P.Ferland - Added support for quickbutton toggle -- Constants CHAT_SKINS = '11302:3' CHAT_SYSTEM = '11302:2' -- Script Properties Define Properties() script_description = "Chat Reconfiguration Behavior" script_long_description = "This behavior handles changes to chat system settings" end -- Commands -- no commands -- Triggers -- Smart Object configurator extension Trigger configure(user, ...) if ( (IsSuperuser(user) == nil) or (IsSuperuser(user) == 0) ) then return 0 -- Only superuser can configure! end end -- Smart Object configuration extension Trigger param_changed(caller, user_id, script_id, name) -- For core modules that need to redraw the UI, restart chat if ( script_id == CHAT_SKINS ) then SendTo(self, 'chat_system_initialize', 0) elseif ( (script_id == CHAT_SYSTEM) and (name == 'chat_system_display_quickbuttons') ) then SendTo(self, 'chat_system_initialize', 0) end end -- Local functions -- no functions