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

Last Connect History


Post New Thread Reply   
 
Thread Tools Display Modes
Atreus
SourceMod Donor
Join Date: Apr 2005
Location: San Diego, CA
Old 09-16-2008 , 01:11   Re: Last Connect History
Reply With Quote #21

This is cool and I really like the !aka feature
Atreus is offline
Send a message via AIM to Atreus Send a message via MSN to Atreus
Atreus
SourceMod Donor
Join Date: Apr 2005
Location: San Diego, CA
Old 04-22-2009 , 04:04   Re: Last Connect History
Reply With Quote #22

The !aka features seems broken. It only returns values for youreslf, no matter what you enter.
Atreus is offline
Send a message via AIM to Atreus Send a message via MSN to Atreus
mardur
Junior Member
Join Date: Mar 2009
Old 04-22-2009 , 05:52   Re: Last Connect History
Reply With Quote #23

The author seems to be inactive since 2007. You may take at look at:
http://forums.alliedmods.net/showthread.php?t=39755
But that is a MM Source Plugin that needs to be installed. It is not just a SourcePawn file.

However, I intend to update this plugin and fix/add some things. First of all, the plugin is vulnerable to SQL injection, as it passes all usernames and steamids to the database without escaping (especially dangerous with the argument of the !last command which every player can use. Note for myself: one should escape the following characters \,",',\r,\n,\0,%,_, at least \ and ' need to be escaped). As already requested, an option to allow only admins to make any requests would be nice (e.g. for our war server). I could also port some other features (delay to avoid spamming, showtimes, keepnames to make the database not grow to infinity) of the above mentioned plugin.

edit: I found the cause for the broken aka feature. The aka-handler explicitely searches the database for names corresponding to the steamid of the calling user (ignoring the argument of !aka). Additionally, the function uses FindTarget without loading the phrases translations (as mentioned in the API), the result however is never used.

Last edited by mardur; 04-22-2009 at 07:54.
mardur is offline
shustas
SourceMod Donor
Join Date: May 2007
Location: London
Old 06-18-2009 , 07:47   Re: Last Connect History
Reply With Quote #24

Quote:
Originally Posted by mardur View Post
The author seems to be inactive since 2007. You may take at look at:
http://forums.alliedmods.net/showthread.php?t=39755
But that is a MM Source Plugin that needs to be installed. It is not just a SourcePawn file.

However, I intend to update this plugin and fix/add some things. First of all, the plugin is vulnerable to SQL injection, as it passes all usernames and steamids to the database without escaping (especially dangerous with the argument of the !last command which every player can use. Note for myself: one should escape the following characters \,",',\r,\n,\0,%,_, at least \ and ' need to be escaped). As already requested, an option to allow only admins to make any requests would be nice (e.g. for our war server). I could also port some other features (delay to avoid spamming, showtimes, keepnames to make the database not grow to infinity) of the above mentioned plugin.

edit: I found the cause for the broken aka feature. The aka-handler explicitely searches the database for names corresponding to the steamid of the calling user (ignoring the argument of !aka). Additionally, the function uses FindTarget without loading the phrases translations (as mentioned in the API), the result however is never used.

So can we expect a fix?
__________________
shustas is offline
oneshot23
Senior Member
Join Date: Feb 2009
Old 07-19-2009 , 02:54   Re: Last Connect History
Reply With Quote #25

Hey great plugin. I have some ideas for you...

You should add this cvar:
lch_names (max names per player to be saved)

You could also make it a menu. Like when you type !admin (menu pops up) have like an added section where it goes into Last Connected. When you press a player it will post in console or say what their names are and steam id. This i think could be a nice feature to add in.
oneshot23 is offline
Bittersweet92101
Junior Member
Join Date: Jan 2023
Old 03-02-2023 , 12:57   Re: Last Connect History
Reply With Quote #26

Quote:
Originally Posted by Atreus View Post
The !aka features seems broken. It only returns values for youreslf, no matter what you enter.
You can, but some of the code is depracated. In public Action:CommandAKA(client, args), see

GetClientAuthString(client, steamId, sizeof(steamId));

GetClientAuthString is depracated, use GetClientAuthId. target should be passed where client originally was.

GetClientAuthId(target, AuthId_Steam2, steamId, sizeof(steamId))

Last edited by Bittersweet92101; 03-02-2023 at 13:01.
Bittersweet92101 is offline
Bittersweet92101
Junior Member
Join Date: Jan 2023
Old 03-02-2023 , 13:05   Re: Last Connect History
Reply With Quote #27

Quote:
Originally Posted by bug View Post
Could this be changed to work for admins only?
In public OnPluginStart(), replace RegConsoleCmd("sm_last", CommandLastConnect);

with RegAdminCmd("sm_last", CommandLastConnect, ADMFLAG_GENERIC).

You can use whatever admin flags you want instead of ADMFLAG_GENERIC, see admins.inc for the options.

Do the same for RegConsoleCmd("sm_aka", CommandAKA);

Last edited by Bittersweet92101; 03-02-2023 at 13:06.
Bittersweet92101 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 06:36.


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