Raised This Month: $51 Target: $400
 12% 

Simple Chat Processor (Redux)


Post New Thread Reply   
 
Thread Tools Display Modes
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 12-18-2012 , 17:35   Re: Simple Chat Processor (Redux)
Reply With Quote #51

(Good) News everyone!
I have recoded this plugin from scratch and have rebuilt some of its functionality.
It will not work with DOD:S yet as I don't know how it functions at all, but we will figure that out some time soon. I initially added a beta feature for SayText (not 2) hook for games like DOD:S, but ended up figuring out that SayText would not work in this situation with its structure.
This has much bigger developer features and should most likely get rid of the repeating chat message issue (as it now does individual checks before sending chat messages). The developer features include per-client forward for things such as user ignore systems, and a 2nd forward (in addition to the "old one") that uses a more stable system to check for recipients.
Finally, this version, when it comes out, will require you guys to not only update the plugin itself but also the translation files. For the sake of customization, I have changed the system so that the type of chat message could be gotten a keyvalue entry, so for example:
Code:
"Phrases"
{
	"Cstrike_Chat_CT_Loc"
	{
		"#format"	"{1:s},{2:s}"
		"en"			"(Counter-Terrorist) {1} :  {2}"
	}
}
This looks like it's a team chat message, and in the old plugin we checked this through hard-coded message checking like this:
PHP Code:
        if (StrContains(cpTranslationName"all"false) != -1)
        {
            
g_CurrentChatType g_CurrentChatType CHATFLAGS_ALL;
        }
        if (
StrContains(cpTranslationName"team"false) != -1
        
||     StrContains(cpTranslationName"survivor"false) != -
        
||    StrContains(cpTranslationName"infected"false) != -1
        
||    StrContains(cpTranslationName"Cstrike_Chat_CT"false) != -
        
||    StrContains(cpTranslationName"Cstrike_Chat_T"false) != -1)
        {
            
g_CurrentChatType g_CurrentChatType CHATFLAGS_TEAM;
        }
        if (
StrContains(cpTranslationName"spec"false) != -1)
        {
            
g_CurrentChatType g_CurrentChatType CHATFLAGS_SPEC;
        }
        if (
StrContains(cpTranslationName"dead"false) != -1)
        {
            
g_CurrentChatType g_CurrentChatType CHATFLAGS_DEAD;
        } 
I didn't like this so the system is now changed, so you can now do this:
Code:
"Phrases"
{
	"Cstrike_Chat_CT_Loc"
	{
		"#format"	"{1:s},{2:s}"
		"en"			"(Counter-Terrorist) {1} :  {2}"
		"scp_teamchat"   "1"
	}
}
This would make it easier to integrate with different and weirdly structured games and should not mess with the SourceMod translation system as I tried to make the key names as specific and unlanguage-like as possible.
This change, however, only contributes to the GetMessageFlags() native, which I hope will be used more often from now on.
I have also added a SetMessageFlags() for developers who are looking into building plugins such as Deadchat and are looking into a more clean looking environment for other plugins who use this same plugin.
__________________
Need help? PM me or add me on Steam.
My Steam




Quote:
Originally Posted by Rp.KryptoNite View Post
For some reason his Plugin never worked for me ,
@credits were added
im not stealing any plugins dude its my THING
minimoney1 is offline
micazoid
Veteran Member
Join Date: Oct 2010
Location: Munich - Germany
Old 12-19-2012 , 04:48   Re: Simple Chat Processor (Redux)
Reply With Quote #52

I like to see progress in this =)

I am exited to see many good Plugins using this! Thank you also to not dump DODS =)

PM me if you need more help regarding DODS. Testing on a DODS-Server is also no problem for me
__________________
micazoid is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 12-24-2012 , 15:58   Re: Simple Chat Processor (Redux)
Reply With Quote #53

I just looked over this, and it looks good. Just a couple of things:
  • In a couple of places, you attempt to call CloseHandle on a convar Handle. You can't close those.
  • You're calling Updater_RemovePlugin() when the "updater" library is removed. This will most likely cause an error, since if Updater is unloaded (which is the only time when the library should be removed), its natives will become invalid. If Updater is unloaded, this plugin is obviously no longer being monitored for updates (since Updater doesn't exist anymore).
  • You're closing some global Handles on OnPluginEnd. This is unneccessary. If a plugin unloads, all of its memory is automatically freed.
__________________
Dr. McKay is offline
Skippy
Senior Member
Join Date: Nov 2011
Old 01-07-2013 , 23:10   Re: Simple Chat Processor (Redux)
Reply With Quote #54

Is it possible to add something to remove any thing to put into the OnChatMessage? Like a disabler or even something to reset it.
Skippy is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 01-07-2013 , 23:36   Re: Simple Chat Processor (Redux)
Reply With Quote #55

Quote:
Originally Posted by Skippy View Post
Is it possible to add something to remove any thing to put into the OnChatMessage? Like a disabler or even something to reset it.
Whuh?
__________________
Dr. McKay is offline
Skippy
Senior Member
Join Date: Nov 2011
Old 01-08-2013 , 00:21   Re: Simple Chat Processor (Redux)
Reply With Quote #56

Like a lot of uses of OnChatMessage is for color. I was wondering if a function could be made to remove or reset the color.
Skippy is offline
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 01-08-2013 , 05:33   Re: Simple Chat Processor (Redux)
Reply With Quote #57

Quote:
Originally Posted by Skippy View Post
Like a lot of uses of OnChatMessage is for color. I was wondering if a function could be made to remove or reset the color.
The upcoming version will have a priority system added to its forwards. You could just set the priority to really low so you get called last and then remove all the colors in the chat.
__________________
Need help? PM me or add me on Steam.
My Steam




Quote:
Originally Posted by Rp.KryptoNite View Post
For some reason his Plugin never worked for me ,
@credits were added
im not stealing any plugins dude its my THING
minimoney1 is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 01-08-2013 , 09:10   Re: Simple Chat Processor (Redux)
Reply With Quote #58

Quote:
Originally Posted by Skippy View Post
Like a lot of uses of OnChatMessage is for color. I was wondering if a function could be made to remove or reset the color.
Why not just remove the plugins that are adding color?
__________________
Dr. McKay is offline
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 01-11-2013 , 17:17   Re: Simple Chat Processor (Redux)
Reply With Quote #59

Quote:
Originally Posted by Dr. McKay View Post
I just looked over this, and it looks good. Just a couple of things:
  • In a couple of places, you attempt to call CloseHandle on a convar Handle. You can't close those.
  • You're calling Updater_RemovePlugin() when the "updater" library is removed. This will most likely cause an error, since if Updater is unloaded (which is the only time when the library should be removed), its natives will become invalid. If Updater is unloaded, this plugin is obviously no longer being monitored for updates (since Updater doesn't exist anymore).
  • You're closing some global Handles on OnPluginEnd. This is unneccessary. If a plugin unloads, all of its memory is automatically freed.
Version 1.1.3 is out to fix the above.
__________________
Need help? PM me or add me on Steam.
My Steam




Quote:
Originally Posted by Rp.KryptoNite View Post
For some reason his Plugin never worked for me ,
@credits were added
im not stealing any plugins dude its my THING
minimoney1 is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 01-11-2013 , 17:47   Re: Simple Chat Processor (Redux)
Reply With Quote #60

Quote:
Originally Posted by minimoney1 View Post
Version 1.1.3 is out to fix the above.
I don't see anything different...?
__________________
Dr. McKay is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:11.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode