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

ShowIP v1.61 - Show IP and hostname [amx_showip]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   General Purpose        Approver:   Hawk552 (427)
ahtoh
Member
Join Date: Jun 2006
Old 02-28-2007 , 09:48   ShowIP v1.61 - Show IP and hostname [amx_showip]
Reply With Quote #1

Useful for LAN servers, allowing players to see who is connecting and disconnecting.
Shows player IP, hostname and IP description

New version 1.6 July-29-2008 - CVAR amx_showip_admins added

* INSTALLATION TIPS:
*
* 1. In order to use this plugin you need NETDB module
* get it here http://forums.alliedmods.net/showthread.php?t=52326
* Put netdb_amxx_i386.so to amxmodx\modules dir
* 2. Add line "netdb" to amxmodx\configs\modules.ini file.
* 3. Put show_ip.amxx to amxmodx\plugins dir.
* 4. Add line "show_ip.amxx" to amxmodx\configs\plugins.ini file.
* 5. Copy example ipdesc.ini file to amxmodx\configs dir.
* 6. Edit ipdesc.ini file.
* Fill it with IP Subnets and their Descriptions.
* IP Subnet must be in CIDR Notation (like 192.168.0.0/24).
* Online Subnet Calcilator: http://www.subnet-calculator.com/cidr.php
* IP Subnet Description will be shown to all players or admins only (depending on amx_showip_admins cvar)
* when player connects or disconnects from the server.
*
*
* CONSOLE COMMANDS:
*
* - amx_showip
* - shows IP, hostname and IP Description of players on server
*
*
* CVARS:
*
* - amx_showip_unknown (default is "")
* - unknown IP subnet (not in ipdesc.ini)
*
* - amx_showip_showhost (default is "1")
* - show hostnames on connect/disconnect
*
* - amx_showip_admins (default is "0")
* - show for admins only
*
*
* VERSION HISTORY:
*
* v1.61 - 07/30/08
* - minor display changes
*
* v1.6 - 07/29/08
* - removed ADMIN_LEVEL macro
* - added amx_showip_admins CVAR
* - code cleanup
*
* v1.55 - 04/20/07
* - Performance optimizations
*
* v1.5 - 04/05/07
* - Threading support for socket functions added (should fix lagging)
*
* v1.4 - 03/08/07
* - reverse DNS support added (use "amx_showip_showhost 0" to disable it)
*
* v1.3 - 03/06/07
* - ADMIN_LEVEL macro added to restrict access if needed
* - code cleanup and performance optimizations
*
* v1.2 - 03/03/07
* - Added colored chat messages support (use "amx_showip_usecolor 0" to disable it)
*
* v1.1 - 03/01/07
* - Added support for CIDR notation for ipdesc.ini file
*
* v1.0 - 02/28/07
* - Original show_ip plugin by W@lker /Yakutsk,Russia/ was rewritten for amxx

two screenshots attached below:
Attached Thumbnails
Click image for larger version

Name:	show_ip1.PNG
Views:	15074
Size:	44.9 KB
ID:	15221   Click image for larger version

Name:	show_ip2.PNG
Views:	12325
Size:	51.6 KB
ID:	15222  
Attached Files
File Type: ini ipdesc.ini (594 Bytes, 9090 views)
File Type: rar netdb.rar (116.2 KB, 10797 views)
File Type: sma Get Plugin or Get Source (show_ip.sma - 12650 views - 9.8 KB)
File Type: amxx show_ip.amxx (18.3 KB, 5525 views)

Last edited by ahtoh; 07-30-2008 at 02:58. Reason: version 1.61
ahtoh is offline
SAMURAI16
BANNED
Join Date: Sep 2006
Old 02-28-2007 , 09:58   Re: show_ip plugin
Reply With Quote #2

On this line : register_concmd("amx_showip", "cmdShowIP", 0,"- shows players IPs")
So you put the acces 0. And here : public cmdShowIP(id, level, cid) for what you ned level and cid ?

Last edited by SAMURAI16; 02-28-2007 at 10:23.
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
Inogood
BANNED
Join Date: Feb 2007
Old 02-28-2007 , 10:49   Re: show_ip plugin
Reply With Quote #3

Code:

Code:
#include <amxmodx> 

public plugin_init() { 
   register_plugin("Pokaz IP", "trawiator", "0.1") 
   register_concmd("amx_showip", "cmd_pokaip", ADMIN_KICK, "Pokazuje IP Graczy") 
} 

public cmd_pokaip(id) 
{ 
   console_print(id," - IP Graczy Bedacych na Serwerze") 
   console_print(id,"---------------------------") 
   new players[32], num 
   get_players(players, num) 
   new i 
    
   for(i=0;i<num;i++) 
   { 
   new name[32] ; 
   new ipeki[32]; 
   get_user_name(players[i],name, 31) 
   get_user_ip(players[i],ipeki, 31, 0) 
   console_print(id,"   -   %s - %s", name,ipeki) 
   } 
   console_print(id, "---------------------------") 
   return PLUGIN_HANDLED 
}
Easy , Fast and Simple
Inogood is offline
SAMURAI16
BANNED
Join Date: Sep 2006
Old 02-28-2007 , 10:56   Re: show_ip plugin
Reply With Quote #4

Inogood if you have ADMIN_KICK on concmd register it's better to use at public name (id,leve,cid) and check if user hace acces, and if not return
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
ahtoh
Member
Join Date: Jun 2006
Old 03-01-2007 , 01:38   Re: show_ip plugin
Reply With Quote #5

I'm goinng to improve my plugin,
first of all, i want to make support IP descriptions file with Subnet in CIDR Notation. (like 192.168.0.1/24)
ahtoh is offline
ahtoh
Member
Join Date: Jun 2006
Old 03-01-2007 , 03:28   Re: show_ip plugin
Reply With Quote #6

its done!
new version released
ahtoh is offline
loren28
Senior Member
Join Date: Nov 2006
Old 03-02-2007 , 04:38   Re: show_ip - Shows players IP and subnet description
Reply With Quote #7

AHTOH maybe u include all this function from the plugin join ip whit color dude for my only.please
here it s the link:
http://forums.alliedmods.net/showthread.php?t=49385

please include for me
loren28 is offline
ahtoh
Member
Join Date: Jun 2006
Old 03-02-2007 , 08:17   Re: show_ip - Shows players IP and subnet description
Reply With Quote #8

easy as fuck
get it and enjoy =)
ahtoh is offline
loren28
Senior Member
Join Date: Nov 2006
Old 03-02-2007 , 09:59   Re: show_ip - Shows players IP and subnet description
Reply With Quote #9

thanks very much .great job .
Now i have a greather chalenge for you if u still want to helpme.for my international server i have 2 plugins that i want to be rewrited.
1) i want that this plugin http://forums.alliedmods.net/showthread.php?p=372646
to be included in this plugin http://forums.alliedmods.net/showthread.php?t=49385

2) to make a comand for plugin that it s going to resulte from request from nr1 to be like this.
a] When i type in server console comand amx_showipall to show all players when new player conect and to see name[ip][steam][country]
b] when i type amx_showipadmin to let only admins whit ban flags to see name[ip][steam][country] when new players it s conecting [all that are dont have flags for bans and rest of players to see only name of new player when conecting]
c] when i type amx_shownameland to let all players and admins to see only name[country]

ofcourse i want to be possible whit cvar not only whit comand from server console.

please
loren28 is offline
6pack
BANNED
Join Date: Mar 2006
Location: Cedarhurst, Long Island
Old 03-02-2007 , 15:38   Re: show_ip - Shows players IP and subnet description
Reply With Quote #10

This plugin is laggy, How do I know? Lag with it, no lag without it.
6pack is offline
Reply


Thread Tools
Display Modes

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 15:11.


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