- Joined
- Dec 7, 2006
- Messages
- 250
- Reaction score
- 2
-Simple Logging Procedure+Table
Procedure:
Table Query:
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.
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: