View Single Post
frAd
Member
Join Date: Apr 2014
Location: Philippines
Old 03-04-2015 , 22:37   Re: Galileo 1.1.290 (a feature rich map voting plugin)
Reply With Quote #1507

Quote:
Originally Posted by Brad View Post
Okay. First, thanks for the find, Spirit.

Galileo registers some commands in plugin_cfg() based on if the commands are enabled, which isn't known until that point. The problem is that all plugins' plugin_init() get called before any plugins' plugin_cfg() gets called. This essentially means that iChat has already deadended the chain of chat handlers before any plugins register, in their plugin_cfg(), that they want to handle chat.

I'd argue that this is a design flaw of iChat. Further, I believe it can be resolved by simply moving iChat's "say" handler register from plugin_init() to plugin_cfg().

To do that, in iChat.sma...

Delete the following two lines from plugin_init():
Code:
    register_clcmd( "say", "iChatHookSay", 0 );     register_clcmd( "say_team", "iChatHookSay", 1 );
Add the following code between plugin_init() and plugin_unpause():
Code:
public plugin_cfg() {     register_clcmd( "say", "iChatHookSay", 0 );     register_clcmd( "say_team", "iChatHookSay", 1 ); }

Please let me know if it works.
Sorry for the late response. It's working right now.
frAd is offline
Send a message via ICQ to frAd Send a message via AIM to frAd Send a message via Yahoo to frAd Send a message via Skype™ to frAd