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

Connect Announce


Post New Thread Reply   
 
Thread Tools Display Modes
Darkthrone
Senior Member
Join Date: Jun 2009
Old 07-13-2010 , 01:59   Re: Connect Announce
Reply With Quote #441

coutry/city can't be detected from private network ip-adresses
only way to solve this is
if {private network ip's} then {print "Private network"}
instead of Unknown
__________________
all the best for your Zombie:Reloaded server
Auto !zspawn | ZProp | Infinite Ammo | Anti-Doorblock

Darkthrone is offline
turk89
Member
Join Date: Jul 2010
Old 07-13-2010 , 08:10   Re: Connect Announce
Reply With Quote #442

Yeah! Where can I change that, Darkthrone?
turk89 is offline
Darkthrone
Senior Member
Join Date: Jun 2009
Old 07-13-2010 , 13:27   Re: Connect Announce
Reply With Quote #443

hey Arg!, tried to modify your plugin, but source have errors that already mentioned above, can you attach fixed source?

cannounce_1.1.1.zip
cannounce_1.2.zip

these archives (smx & compiled sp) have same errors:
Code:
L 07/13/2010 - 23:41:38: [SM] Native "CloseHandle" reported: Handle 0 is invalid (error 4)
L 07/13/2010 - 23:41:38: [SM] Displaying call stack trace for plugin "cannounce.smx":
L 07/13/2010 - 23:41:38: [SM]   [0]  Line 28, D:\Dev\sourcemod\cannounce\tags\Release_1.2\tools\sourcemod-1.3.2\addons\sourcemod\scripting\include\geocity.inc::GeoipCity()
L 07/13/2010 - 23:41:38: [SM]   [1]  Line 302, temp\cannounce.sp::GetFormattedMessage()
L 07/13/2010 - 23:41:38: [SM]   [2]  Line 249, temp\cannounce.sp::PrintFormattedMessageToAdmins()
L 07/13/2010 - 23:41:38: [SM]   [3]  Line 68, temp\cannounce/countryshow.sp::OnPostAdminCheck_CountryShow()
L 07/13/2010 - 23:41:38: [SM]   [4]  Line 148, temp\cannounce.sp::OnClientAuthorized()
only cannounce.smx, attached to the post #417 runs without error
__________________
all the best for your Zombie:Reloaded server
Auto !zspawn | ZProp | Infinite Ammo | Anti-Doorblock

Darkthrone is offline
turk89
Member
Join Date: Jul 2010
Old 07-13-2010 , 14:25   Re: Connect Announce
Reply With Quote #444

Cool that you have tried to look at it, Darkthrone. I appreciate it.

While getting that problem solved, is it possible to add a Cvar at the same time? I am thinking about cannounce_log.

"cannounce_log" "1", "turns on and off logging of connects and disconnect to a log file, of which 1 = on and 0 = off (default = 1). Then log file should be created, say "data/cannounce_log.log" or another place.

Last edited by turk89; 07-13-2010 at 14:32.
turk89 is offline
Xterminator
Junior Member
Join Date: Apr 2009
Old 07-13-2010 , 19:14   Re: Connect Announce
Reply With Quote #445

That error is caused by geocity.inc, not the plugin itself. To fix it all you have to do is replace
Code:
        CloseHandle( GeoCityQuery );
with
Code:
        if( GeoCityQuery != INVALID_HANDLE )
        {
            CloseHandle( GeoCityQuery );
        }
Xterminator is offline
Arg!
Veteran Member
Join Date: Jul 2008
Location: Australia
Old 07-13-2010 , 19:27   Re: Connect Announce
Reply With Quote #446

Quote:
Originally Posted by turk89 View Post
I am awaiting for your reply, Arg!
see above for your reply

Quote:
Originally Posted by Xterminator View Post
That error is caused by geocity.inc, not the plugin itself. To fix it all you have to do is replace
Code:
        CloseHandle( GeoCityQuery );
with
Code:
        if( GeoCityQuery != INVALID_HANDLE )
        {
            CloseHandle( GeoCityQuery );
        }
i originally had this in there, but it appears to be casuing the memory leak error someone else reported since its not closing the handle.

the error will need to be fixed by the creator of the include.
__________________
Arg! is offline
Arg!
Veteran Member
Join Date: Jul 2008
Location: Australia
Old 07-13-2010 , 19:28   Re: Connect Announce
Reply With Quote #447

Quote:
Originally Posted by turk89 View Post
Cool that you have tried to look at it, Darkthrone. I appreciate it.

While getting that problem solved, is it possible to add a Cvar at the same time? I am thinking about cannounce_log.

"cannounce_log" "1", "turns on and off logging of connects and disconnect to a log file, of which 1 = on and 0 = off (default = 1). Then log file should be created, say "data/cannounce_log.log" or another place.
this stuff is already logged by srcds, it can be easily extracted using a stats package such as Psychostats.
__________________
Arg! is offline
turk89
Member
Join Date: Jul 2010
Old 07-13-2010 , 19:38   Re: Connect Announce
Reply With Quote #448

Quote:
Originally Posted by Xterminator View Post
That error is caused by geocity.inc, not the plugin itself. To fix it all you have to do is replace
Code:
        CloseHandle( GeoCityQuery );
with
Code:
        if( GeoCityQuery != INVALID_HANDLE )
        {
            CloseHandle( GeoCityQuery );
        }
I am not good at this. What happends by editing this? What will be changed in-game? However, where do you find that "geocity.inc"-file? I have a file called GeoIP (DAT file) - is it this one?



Quote:
Originally Posted by Arg! View Post
this stuff is already logged by srcds, it can be easily extracted using a stats package such as Psychostats.
Sounds great!
turk89 is offline
Arg!
Veteran Member
Join Date: Jul 2008
Location: Australia
Old 07-13-2010 , 19:44   Re: Connect Announce
Reply With Quote #449

The best course of action here would be to lodge a bug in the thread here - http://forums.alliedmods.net/showthread.php?t=124288 - which is the one pertaining to the functionality in question.
__________________
Arg! is offline
turk89
Member
Join Date: Jul 2010
Old 07-13-2010 , 19:59   Re: Connect Announce
Reply With Quote #450

Arg! I just clicked on that link, and followed this installation:

Installation

Download geocity.inc and put it in "addons\sourcemod\scripting\include".
Download GeoLiteCity.zip and extract GeoLiteCity.sq3 into "addons\sourcemod\data\sqlite" on the server.

Then just include geocity to your source code.

#include <geocity>


Now, after replacing my old .smx file with new one, the connect message is completely gone? WTF.

By using this plugin: http://forums.alliedmods.net/showpos...&postcount=190 it automatically shows up "Local Network" when I am joining, but in the end I prefer your plugin, Arg!
This little country-detail for me is really annoying.

Last edited by turk89; 07-13-2010 at 21:00.
turk89 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 00:39.


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