Promuj serwer
Black Friday Koniec za 50% taniej: miejsce na Master Serverze i lista Client, z PREMIUM DOZYWOTNIO
09 Godz 30 Min 07 Sek
Zobacz oferty

Initial release 1.0.0

Browse Source
1.0.0 - Initial release.
Daemon666 committed commit 22cf389d345818d63532aa177df07b79dc7ff0a3
4 changed files with 190 additions and 0 deletions
+3 -0 CHANGELOG.md A
@@ -0,0 +1,3 @@
1 +## 1.0.0 (2025-10-26)
2 +
3 +1.0.0 - Initial release.
+1 -0 README.md A
@@ -0,0 +1 @@
1 +<p><strong>CSB Who Is</strong> is the admin lookup you reach for when cross-referencing bans or checking for VPNs. <code>amx_who</code> dumps a card for every connected player to your console: userid, name, SteamID, IP, GeoIP country code and name, ping, minutes on the server and access flags. The <code>say /who</code> menu lets you pick a single player and print just their card.</p><p>Country lookup uses the <code>geoip</code> module (<code>geoip_code2</code> into a three-byte buffer, plus <code>geoip_country</code> for the full name). Time on server is measured from <code>client_putinserver</code>. Inspired by the info commands in the AMX Mod X <em>Admin Commands</em> plugin; independent GPL re-implementation.</p><h2>Features</h2><ul><li>Per-player card: SteamID, IP, country, ping, time, flags.</li><li>Console dump (<code>amx_who</code>) and single-player menu (<code>say /who</code>).</li><li>GeoIP country from the IP with a clean <code>??</code>/Unknown fallback.</li><li>Access flags rendered as their letters via <code>get_flags</code>.</li></ul><h2>Installation</h2><ol><li>Enable the <code>geoip</code> module in <code>addons/amxmodx/configs/modules.ini</code>.</li><li>Compile <code>csb_admin_who.sma</code>, copy it to <code>addons/amxmodx/plugins/</code> and add it to <code>plugins.ini</code>.</li><li>Change the map.</li></ol><p><code>amx_who</code> and <code>/who</code> need the <code>ADMIN_KICK</code> flag (<code>c</code>).</p>
+150 -0 addons/amxmodx/scripting/csb_admin_who.sma A
@@ -0,0 +1,150 @@
1 +/*
2 + * CSB Who Is
3 + * Copyright (C) 2026 counter-strike-boost.com
4 + *
5 + * amx_who dumps every connected player's SteamID, IP, ping, country (GeoIP),
6 + * time on server and access flags to the admin's console. A /who menu lets an
7 + * admin pick a player and print the same card. Handy for cross-referencing bans
8 + * and spotting VPNs.
9 + *
10 + * Inspired by the info commands in the AMX Mod X Admin Commands plugin.
11 + * Independent GPL re-implementation.
12 + *
13 + * This program is free software: you can redistribute it and/or modify it under
14 + * the terms of the GNU General Public License as published by the Free Software
15 + * Foundation, either version 3 of the License, or (at your option) any later
16 + * version. It is distributed in the hope that it will be useful, but WITHOUT
17 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 + * FOR A PARTICULAR PURPOSE. See <https://www.gnu.org/licenses/> for details.
19 + */
20 +
21 +#include <amxmodx>
22 +#include <amxmisc>
23 +#include <geoip>
24 +
25 +new const PLUGIN[] = "CSB Who Is"
26 +new const VERSION[] = "1.0.0"
27 +new const AUTHOR[] = "counter-strike-boost.com"
28 +
29 +new g_iJoin[33]
30 +
31 +public plugin_init()
32 +{
33 + register_plugin(PLUGIN, VERSION, AUTHOR)
34 +
35 + register_concmd("amx_who", "cmdWho", ADMIN_KICK, "- print SteamID/IP/ping/country/flags for everyone")
36 + register_clcmd("say /who", "cmdWhoMenu")
37 + register_clcmd("say_team /who", "cmdWhoMenu")
38 +}
39 +
40 +public client_putinserver(id)
41 +{
42 + g_iJoin[id] = get_systime()
43 +}
44 +
45 +public client_disconnected(id)
46 +{
47 + g_iJoin[id] = 0
48 +}
49 +
50 +formatCard(id, out[], len)
51 +{
52 + new name[32], authid[35], ip[32], flagStr[32]
53 + new ccode[3], country[46]
54 +
55 + get_user_name(id, name, charsmax(name))
56 + get_user_authid(id, authid, charsmax(authid))
57 + get_user_ip(id, ip, charsmax(ip), 1)
58 + get_flags(get_user_flags(id), flagStr, charsmax(flagStr))
59 +
60 + if (!flagStr[0])
61 + copy(flagStr, charsmax(flagStr), "-")
62 +
63 + if (!geoip_code2(ip, ccode))
64 + copy(ccode, charsmax(ccode), "??")
65 +
66 + if (!geoip_country(ip, country, charsmax(country)))
67 + copy(country, charsmax(country), "Unknown")
68 +
69 + new ping, loss
70 + get_user_ping(id, ping, loss)
71 +
72 + new mins = g_iJoin[id] ? (get_systime() - g_iJoin[id]) / 60 : 0
73 +
74 + formatex(out, len, "#%d %s | %s | %s (%s) %s | ping %d | %d min | flags %s",
75 + get_user_userid(id), name, authid, ip, ccode, country, ping, mins, flagStr)
76 +}
77 +
78 +public cmdWho(id, level, cid)
79 +{
80 + if (!cmd_access(id, level, cid, 1))
81 + return PLUGIN_HANDLED
82 +
83 + console_print(id, "----- CSB Who Is -----")
84 +
85 + new players[32], num, pid, card[192]
86 + get_players(players, num)
87 +
88 + for (new i = 0; i < num; i++)
89 + {
90 + pid = players[i]
91 + formatCard(pid, card, charsmax(card))
92 + console_print(id, "%s", card)
93 + }
94 +
95 + console_print(id, "----- %d player(s) -----", num)
96 + return PLUGIN_HANDLED
97 +}
98 +
99 +public cmdWhoMenu(id)
100 +{
101 + if (!(get_user_flags(id) & ADMIN_KICK))
102 + {
103 + client_print(id, print_chat, "[CSB] You do not have access to /who.")
104 + return PLUGIN_HANDLED
105 + }
106 +
107 + new menu = menu_create("\yWho Is - pick a player", "whoMenuHandler")
108 +
109 + new players[32], num, pid, name[32], info[8]
110 + get_players(players, num)
111 +
112 + for (new i = 0; i < num; i++)
113 + {
114 + pid = players[i]
115 + get_user_name(pid, name, charsmax(name))
116 + num_to_str(pid, info, charsmax(info))
117 + menu_additem(menu, name, info, 0)
118 + }
119 +
120 + menu_display(id, menu, 0)
121 + return PLUGIN_HANDLED
122 +}
123 +
124 +public whoMenuHandler(id, menu, item)
125 +{
126 + if (item == MENU_EXIT || item < 0)
127 + {
128 + menu_destroy(menu)
129 + return PLUGIN_HANDLED
130 + }
131 +
132 + new info[8], name[32], access, callback
133 + menu_item_getinfo(menu, item, access, info, charsmax(info), name, charsmax(name), callback)
134 + menu_destroy(menu)
135 +
136 + new target = str_to_num(info)
137 +
138 + if (target < 1 || !is_user_connected(target))
139 + {
140 + client_print(id, print_chat, "[CSB] That player left.")
141 + return PLUGIN_HANDLED
142 + }
143 +
144 + new card[192]
145 + formatCard(target, card, charsmax(card))
146 +
147 + console_print(id, "[CSB Who] %s", card)
148 + client_print(id, print_chat, "[CSB] Details for %s printed to your console (~ key).", name)
149 + return PLUGIN_HANDLED
150 +}
+36 -0 csb.json A
@@ -0,0 +1,36 @@
1 +{
2 + "name": "CSB Who Is",
3 + "category": "admin",
4 + "tags": "info, steamid, ip",
5 + "image": "",
6 + "original_author": "AMX Mod X Development Team (Admin Commands)",
7 + "original_url": "",
8 + "license": "GPL-3.0",
9 + "title": "CSB Who Is",
10 + "short_desc": "amx_who prints every player's SteamID, IP, ping, country (GeoIP), time on server and flags; a /who menu prints one card.",
11 + "version": "1.0.0",
12 + "amxx_min": "1.9",
13 + "amxx_compile_default": "1.9",
14 + "rehlds_ok": true,
15 + "hlds_ok": true,
16 + "regamedll_required": false,
17 + "metamod_flavor": "any",
18 + "reapi_required": false,
19 + "modules": "geoip",
20 + "install_notes": "1. Enable the geoip module in addons/amxmodx/configs/modules.ini\n2. Put csb_admin_who.amxx in addons/amxmodx/plugins/ and add it to plugins.ini\n3. Change map",
21 + "known_conflicts": "",
22 + "cvars": [],
23 + "commands": [
24 + {
25 + "name": "amx_who",
26 + "access": "c (ADMIN_KICK)",
27 + "description": "Print SteamID/IP/ping/country/flags for everyone to console."
28 + },
29 + {
30 + "name": "say /who",
31 + "access": "c (ADMIN_KICK)",
32 + "description": "Open a menu to print one player's card."
33 + }
34 + ],
35 + "main": "addons/amxmodx/scripting/csb_admin_who.sma"
36 +}
0 37