AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   ShowIP v1.61 - Show IP and hostname [amx_showip] (https://forums.alliedmods.net/showthread.php?t=51990)

ahtoh 02-28-2007 09:48

ShowIP v1.61 - Show IP and hostname [amx_showip]
 
21 Attachment(s)
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:

SAMURAI16 02-28-2007 09:58

Re: show_ip plugin
 
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 ?

Inogood 02-28-2007 10:49

Re: show_ip plugin
 
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

SAMURAI16 02-28-2007 10:56

Re: show_ip plugin
 
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

ahtoh 03-01-2007 01:38

Re: show_ip plugin
 
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 03-01-2007 03:28

Re: show_ip plugin
 
its done!
new version released

loren28 03-02-2007 04:38

Re: show_ip - Shows players IP and subnet description
 
AHTOH maybe u include all this function from the plugin join ip whit color dude for my only:cry:.please:cry:
here it s the link:
http://forums.alliedmods.net/showthread.php?t=49385

please include for me:cry:

ahtoh 03-02-2007 08:17

Re: show_ip - Shows players IP and subnet description
 
easy as fuck :)
get it and enjoy =)

loren28 03-02-2007 09:59

Re: show_ip - Shows players IP and subnet description
 
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.:oops: :oops:

please :cry:

6pack 03-02-2007 15:38

Re: show_ip - Shows players IP and subnet description
 
This plugin is laggy, How do I know? Lag with it, no lag without it.


All times are GMT -4. The time now is 07:59.

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