Raised This Month: $ Target: $400
 0% 

Connect Announce


Post New Thread Reply   
 
Thread Tools Display Modes
Arg!
Veteran Member
Join Date: Jul 2008
Location: Australia
Old 10-21-2011 , 19:45   Re: Connect Announce
Reply With Quote #591

Version 1.4 release, see OP for more info.
__________________
Arg! is offline
Kudjo
Junior Member
Join Date: Jan 2010
Old 10-25-2011 , 13:33   Re: Connect Announce
Reply With Quote #592

Sourcemod-1.4-hg 3419
MMsource-1.9.0-hg767
********************************************* ************
[SM] Native "CloseHandle" reported: Handle 0 is invalid (error 4)
L 10/25/2011 - 21:27:08: [SM] Displaying call stack trace for plugin "cannounce.smx":
L 10/25/2011 - 21:27:08: [SM] [0] Line 28, C:\Games\ServerCSS\css\cstrike\addons\sourcem od\scripting\include\geocity.inc::GeoipCity()
L 10/25/2011 - 21:27:08: [SM] [1] Line 341, cannounce.sp::GetFormattedMessage()
L 10/25/2011 - 21:27:08: [SM] [2] Line 261, cannounce.sp:: PrintFormattedMessageToAll()
L 10/25/2011 - 21:27:08: [SM] [3] Line 73, cannounce/countryshow.sp::OnPostAdminCheck_CountryShow( )
L 10/25/2011 - 21:27:08: [SM] [4] Line 167, cannounce.sp::OnClientPostAdminCheck()
********************************************* ************
Kudjo is offline
Dont Fear The Reaper
Member
Join Date: Nov 2011
Old 11-03-2011 , 11:05   Re: Connect Announce
Reply With Quote #593

Hey,

first of all thanks for this nice plugin and great work.

Until now we were using n3wton's plugin (http://forums.alliedmods.net/showthread.php?t=121919) on our L4D2 servers which uses the same method (http://forums.alliedmods.net/showthread.php?t=124288) to get the player's city names, well no wonder since it was written by n3wton too.

The main reason to look for another method was to be able to maintain/update the city database more easily, besides a few other issues, and i found GoD-Tony's extension (http://forums.alliedmods.net/showthread.php?t=132470) which was already mentioned earlier in this thread and seems to be a nice improvement. He also posted a modified version of the connect announce plugin as an example to use the extension, but looking in this thread i saw there's already a new version of this plugin.

Long story short:

I integrated the snippets from GoD-Tony's modified version of 1.3 into 1.4 so it uses his extension. Doing that and while testing I found some minor bugs and typos in the latest connect announce version.

- Problem displaying olive correct, it was missing a }:
Code:
static String:g_sSColors[5][13]  = { (...)  "{OLIVE}" };
And related to that in the GetFormattedMessage function, I'm not sure if String:sColor[4] should be [5] too.


- The problem mentioned earlier in this thread that it removes one character from the "country code" if it's LAN:
Code:
Format( ccode, sizeof(ccode)+1, "%T", "LAN Country Short", LANG_SERVER );
Adding the +1 for the length fixed that problem for me, maybe the reference to the translation file is consuming one character. Note that ccode only has 2 characters anyway, but it was only displaying 1 for me before (just "L" instead of "LN" for example).


Besides integrating GoD-Tony's extension based on his modified version I also added a few things like:

- Add "The" to certain countries (for example "The United States", based on n3wton's plugin)
- Configurable strings in the translation file for LAN and unknown locations (city, region, country, country code, country code 3)
- Fallback for empty location strings which uses the strings for unknown locations in the translation file (for example if a record was found, but only with the country and not a city or region)

Both, for the connect announce itself and the geolist part.

Would be nice if you could officially integrate some of it. If you're interested, i can upload my sources as well as the translation file.

Thanks in advance

Last edited by Dont Fear The Reaper; 11-03-2011 at 12:14.
Dont Fear The Reaper is offline
xioSlayer
Senior Member
Join Date: Apr 2011
Old 11-05-2011 , 02:31   Re: Connect Announce
Reply With Quote #594

Whenever a player disconnects now, the reason is always blank now... what might cause that? is that happening for everyone?
xioSlayer is offline
Arg!
Veteran Member
Join Date: Jul 2008
Location: Australia
Old 11-05-2011 , 05:55   Re: Connect Announce
Reply With Quote #595

im guessing it wouldve been reported by now so im guessing an edge case or configuration issue, lemme know if you can narrow the cause down further
__________________
Arg! is offline
xioSlayer
Senior Member
Join Date: Apr 2011
Old 11-06-2011 , 01:48   Re: Connect Announce
Reply With Quote #596

Code:
GetEventString(event, "reason", reason, sizeof(reason));
LogStuff("reason detected as: %s", reason);
I output the string to a file right after this line in your code. it outputs as null. What do you think might cause that?

I will try the cannounce plugin by itself after these players get off.
xioSlayer is offline
Arg!
Veteran Member
Join Date: Jul 2008
Location: Australia
Old 11-06-2011 , 01:52   Re: Connect Announce
Reply With Quote #597

much appreciated
__________________
Arg! is offline
Dont Fear The Reaper
Member
Join Date: Nov 2011
Old 11-06-2011 , 10:41   Re: Connect Announce
Reply With Quote #598

Quote:
Originally Posted by xioSlayer View Post
Whenever a player disconnects now, the reason is always blank now... what might cause that? is that happening for everyone?
The disconnect reason was still showing up fine on our L4D2 servers after the last update (v2.0.9.1). Did you edit the countryshow.sp (besides the logging of course)?


In addition to my last post:

- Added the possibility to configure the Admin/Player strings for {PLAYERTYPE} in the translation file (for example to a color placeholder or whatever you want)
- Added the ability to set up random enhanced disconnect messages (for fun purposes )

If someone's interested, let me know

Last edited by Dont Fear The Reaper; 11-06-2011 at 10:47.
Dont Fear The Reaper is offline
Kudjo
Junior Member
Join Date: Jan 2010
Old 11-06-2011 , 14:22   Re: Connect Announce
Reply With Quote #599

Quote:
Originally Posted by Dont Fear The Reaper View Post
The disconnect reason was still showing up fine on our L4D2 servers after the last update (v2.0.9.1). Did you edit the countryshow.sp (besides the logging of course)?


In addition to my last post:

- Added the possibility to configure the Admin/Player strings for {PLAYERTYPE} in the translation file (for example to a color placeholder or whatever you want)
- Added the ability to set up random enhanced disconnect messages (for fun purposes )

If someone's interested, let me know
in studio
Kudjo is offline
xioSlayer
Senior Member
Join Date: Apr 2011
Old 11-06-2011 , 18:21   Re: Connect Announce
Reply With Quote #600

I have located the problem. It is a conflict with Rcon Locker.

EDIT: found the line that was causing the issues.

Code:
public Action:player_disc(Handle:event, const String:name[], bool:dontBroadcast)
{
    SetEventString(event,"reason","");
    return Plugin_Continue;
}
I'm not sure what the reason for this bit of code was, perhaps there is an exploit where clients can modify that event string into something malicious, idk. I commented out the event hook and posted the source code here if anyone else needs it.
Attached Files
File Type: sp Get Plugin or Get Source (rcon_lock.sp - 367 views - 13.2 KB)

Last edited by xioSlayer; 11-07-2011 at 16:16.
xioSlayer 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 22:56.


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