Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

User-Logging

Experienced Elementalist
Joined
Dec 7, 2006
Messages
250
Reaction score
2
-Simple Logging Procedure+Table

Procedure:

Code:
USE [KN_online]
GO
/****** Object:  StoredProcedure [dbo].[USER_LOG]    Script Date: 08/17/2008 16:32:10 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:        <Techno>@adrenalinerush2.net
-- 
-- Description:    <Insert users into the table: USER_LOG>
-- =============================================
CREATE PROCEDURE [dbo].[USER_LOG]
@AccountID     varchar(21),
@CharID         varchar(21),
@ClientIP       varchar(20)


AS
BEGIN

  
    INSERT INTO USER_LOGIN_LOG (AccountID, Character, ip, date) VALUES (@AccountID, @CharID, @ClientIP, getdate())
END

Table Query:
Code:
USE [KN_online]
GO
/****** Object:  Table [dbo].[USER_LOGIN_LOG]    Script Date: 08/17/2008 16:34:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[USER_LOGIN_LOG](
    [AccountID] [varchar](21) NOT NULL,
    [Character] [varchar](21) NULL,
    [ip] [varchar](20) NOT NULL,
    [date] [smalldatetime] NULL
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF

Just put in:
EXEC LOG_USER @accountid @charid @clientip

in Procedure: PROC_INSERT_CURRENT_USER

Now if you want to ban someone, just go to that table and voila! u got the ip of the user.
 
Last edited by a moderator:
Junior Spellweaver
Joined
Jun 5, 2006
Messages
133
Reaction score
0
Re: [Share] User-Logging

you could have just coppied the insert_current user procedure, coppied the table, change the table name for the copy procedure to insert into, and viola lol. that's what i did. This serves a much higher use than just to ip ban users. This serves as a way to see who logs on what account. And if you are smart you will add a date column like you did. ^^
 
Newbie Spellweaver
Joined
Jun 20, 2008
Messages
57
Reaction score
0
Re: [Share] User-Logging

Or you can add a bit to make the Ip appear in TB_user, I forgot where I saw the code, I can pull it up for you if you want. As for Ip banning I just use comodo, so that they can't change Ip and make more accounts. They can't attack server either. My server has turned into a fortress lol. I think comodo also prevents third party tools as well but idk havn't tested. It blocks everything except normal log ins and such.
 
Experienced Elementalist
Joined
Dec 7, 2006
Messages
250
Reaction score
2
Re: [Share] User-Logging

i still find this user-logging important, what is comodo exactly/ 0-0
 
Junior Spellweaver
Joined
Jun 5, 2006
Messages
133
Reaction score
0
Re: [Share] User-Logging

nah, the tb_user part is a waste of time. use that to log the ip that registered the account. pointless to log the last ip used. this script will do that.
 
Newbie Spellweaver
Joined
Jun 20, 2008
Messages
57
Reaction score
0
Re: [Share] User-Logging

spamman I think we were talking about the same script.
Code:
ALTER PROCEDURE [dbo].[PROC_INSERT_CURRENTUSER]
@AccountID varchar(50),
@CharID varchar(50),
@ServerNo int,
@ServerIP varchar(50),
@ClientIP varchar(50),
@nret smallint output

AS

INSERT INTO CURRENTUSER ( nServerNo, strServerIP, strAccountID, strCharID, strClientIP ) Values (@ServerNo, @ServerIP, @AccountID, @CharID, @ClientIP )
set @nret=1

update tb_user set IP = @clientip where straccountid = @accountid


This code will add the Ip to TB_user for everytime that the account is logged and it will update everytime.

Maybe this was the code you were talking about spam?
and ceelan this is what I put on another post
Download comodo from download.com. It is like a security complex, and if you aren't new to computers then I would recommend it. It monitors all IPs that are connecting using different programs. *you can see all the IPs using your web server and game server, as well as set blocked IPs that won't even be able to use your KOpanel.

It is a firewall+intrusion detector (detects remote desktop applications) + anti spyware all in one and its free.

BEWARE it is very very strict
 
Newbie Spellweaver
Joined
May 21, 2007
Messages
81
Reaction score
1
Re: [Share] User-Logging

As for Ip banning I just use comodo, so that they can't change Ip and make more accounts. They can't attack server either. My server has turned into a fortress lol. I think comodo also prevents third party tools as well but idk havn't tested. It blocks everything except normal log ins and such.
If you believe that, you seriously must be very ignorant.

Comodo does not stop people from changing their IP address.
Comodo does not prevent third party tools - that is client side.
Comodo does not prevent server attacks, though it probably does help. Heavy flooding, and bye-bye server.
 
Newbie Spellweaver
Joined
Jun 20, 2008
Messages
57
Reaction score
0
Re: [Share] User-Logging

It can block a single IP, IP range, IP mask, host name, or mac address. The guy that I blocked has not come back. So maybe I'm not as ignorant as I seem? I have not seen a single KOXP user on my server, and comodo has blocked several IPs as they were doing a suspicious intrusion in the server. So does it block third party tools? idk... but I wouldn't resort to flaming Iceman. I don't think you even have comodo so how could you know?
 
Back
Top