• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Gm_login_log

Experienced Elementalist
Joined
Dec 7, 2006
Messages
250
Reaction score
2
Topic title says all

add this below in LOAD_USER_DATA procedure:

Code:
if @id like 'GM_%'
BEGIN
INSERT INTO GM_LOGIN_LOG (strAccountID,strUserID, LoginDate) VALUES (@AccountID,@id, getdate() )
END

Table query:

Code:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[GM_LOGIN_LOG](
    [strAccountID] [char](50) NULL,
    [strUserID] [char](50) NULL,
    [LoginDate] [smalldatetime] NULL
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF

u gotta edit the
Code:
if @id like 'GM_%'
part though it easy, for example a char is named; GM_RageZone.
then this character will be inserted into GM_LOGIN_LOG.
the same will count for GM_e7823odi27tgdi

but if u make it:

Code:
if @id like 'GM%'

it would add charnames like:

canibegmplz
and:
GMRageZone

you can also add an OR statement to the code like:

Code:
if @id like 'GM_%' OR @id like 'GM%'
BEGIN
INSERT INTO GM_LOGIN_LOG (strAccountID,strUserID, LoginDate) VALUES (@AccountID,@id, getdate() )
END

now it would log both
canibegmplz
GMRageZone
and
GM_RageZone

Woot another epic release, lol.

:laugh:
 
Newbie Spellweaver
Joined
Feb 23, 2006
Messages
25
Reaction score
0
Re: [Share]GM_LOGIN_LOG

Actually, "if @id like 'GM%' will not tag canibegmplz".
'%GM%' will.
 
Experienced Elementalist
Joined
Dec 7, 2006
Messages
250
Reaction score
2
Re: [Share]GM_LOGIN_LOG

ah wait srry im stupid lol, your right indeed. i knew that LoL
 
Junior Spellweaver
Joined
Jun 5, 2006
Messages
133
Reaction score
0
Re: [Share]GM_LOGIN_LOG

Hellfire, nice littel release for the kiddies that don't know sql, but how are you going about keeping regular players from making names with GM in them? This is how i doit

I simplify it a little more than you, because people like to use gm in their name, whether the name be "KingMe" notice the gm in that, however you could use like 'gm%' that would work, but it's easier to just make gms use GameMaster instead of GM. That way there are no mistakes, and you can just deny the use of gamemaster in a new char name. like that in create_new_char
You will have to have your gms make a char, give them gm, and name change them to do this though. However, it saves you from ppl posing as gms, cuz they can't have gamemaster in their name, and only gamemasters do.
Code:
if @charid like '%gamemaster%'
begin
set @nret = 5
return
end
 
Back
Top