ArcEmu: Prepaid Account run out of time - ArcEmu

Jump to content

Toggle shoutbox Lastest Announcements

dfighter  : (07 December 2014 - 12:06 PM) Arcemu is in hibernation mode, please read http://arcemu.org/fo...showtopic=26903
dfighter  : (01 January 2013 - 05:56 PM) Arcemu wishes you all a happy new year!
Hasbro  : (12 September 2012 - 10:01 AM) Please excuse our outage from the web! Our web host had a major malfunction!
dfighter  : (01 September 2012 - 04:05 PM) Since the spam bots just don't want to stop, I've enabled admin verification when registering.
dfighter  : (23 January 2012 - 09:56 PM) Please note that from now on you will need to confirm your email on the wiki in order to edit it!
Hasbro  : (31 December 2011 - 12:50 PM) Happy New Years all!
Navid  : (26 December 2011 - 04:09 AM) Merry Christmas !!!!!! Happy holidays all :)
WAmadeus  : (24 December 2011 - 03:54 PM) Merry Christmas to all!
dfighter  : (24 December 2011 - 11:05 AM) The Arcemu team wishes y'all a Merry Christmukkah!
Hasbro  : (05 October 2011 - 12:53 PM) Looking for web designers for upcoming web related project. If you're interested in designing user interfaces contact me
dfighter  : (02 September 2011 - 03:47 PM) So who here wants vehicles in Arcemu? :P http://arcemu.org/fo...showtopic=25440
Hasbro  : (14 August 2011 - 03:25 PM) Join us on irc, grab an irc client and connect to irc.freenode.net join channel #arcemu /server irc.freenode.net:6667 /join #arcemu
jackpoz  : (03 August 2011 - 05:33 AM) to all Lua Engine (old one) users: please check http://arcemu.org/fo...showtopic=25274
Hasbro  : (20 May 2011 - 05:27 PM) Looking for people experienced with CMake configuration and setup! Contact me asap
Hasbro  : (15 May 2011 - 05:03 PM) ArcEmu is recruiting C++ programmers, contact Hasbro if interested.
paroxysm  : (03 May 2011 - 06:26 PM) Updated luabridge gossip example to describe the whole gossip creation process rather than just how to create menu. Gossip tutorial
paroxysm  : (23 April 2011 - 11:35 AM) Lua writers can refer to the Luabridge Tutorials section in the Wiki to learn how to write gossip code correctly.
Hasbro  : (20 April 2011 - 05:22 PM) Thank you for your continuous contribution of bug reports, we are working on them.
Hasbro  : (17 April 2011 - 03:20 AM) Please consider donating to support our bills. Donations can be sent using PayPal to donations@arcemu.org - Thank you for your support.
paroxysm  : (10 April 2011 - 12:43 AM) Refer to the Luabridge Tutorials section in the Wiki to learn the new syntax of luabridge.
Resize Shouts Area

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Prepaid Account run out of time Ability to display that message

#1 User is offline   dark alex ~ BAWoW 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 276
  • Joined: 15-June 08

Posted 16 March 2009 - 12:20 PM

With this Patch a Player gets the messagt that his prepaid account has run out of gametime if you set banned to 2.

Diff Patch
Index: src/arcemu-logonserver/AuthSocket.cpp
===================================================================
--- src/arcemu-logonserver/AuthSocket.cpp (revision 2316)
+++ src/arcemu-logonserver/AuthSocket.cpp (working copy)
@@ -208,6 +208,11 @@
SendChallengeError(CE_ACCOUNT_CLOSED);
return;
}
+ else if(m_account->Banned == 2)
+ {
+ SendChallengeError(CE_PREORDER_TIME_LIMIT);
+ return;
+ }
else if(m_account->Banned > 0)
{
SendChallengeError(CE_ACCOUNT_FREEZED);
@@ -590,6 +595,11 @@
SendChallengeError(CE_ACCOUNT_CLOSED);
return;
}
+ else if(m_account->Banned == 2)
+ {
+ SendChallengeError(CE_PREORDER_TIME_LIMIT);
+ return;
+ }
else if(m_account->Banned > 0)
{
SendChallengeError(CE_ACCOUNT_FREEZED);
Index: src/arcemu-logonserver/AccountCache.cpp
===================================================================
--- src/arcemu-logonserver/AccountCache.cpp (revision 2316)
+++ src/arcemu-logonserver/AccountCache.cpp (working copy)
@@ -108,19 +108,19 @@
acct->AccountId = field[0].GetUInt32();
acct->AccountFlags = field[5].GetUInt8();
acct->Banned = field[6].GetUInt32();
- if ( (uint32)UNIXTIME > acct->Banned && acct->Banned != 0 && acct->Banned != 1) //1 = perm ban?
+ if ( (uint32)UNIXTIME > acct->Banned && acct->Banned != 0 && acct->Banned > 3) //1 = perm ban?
{
//Accounts should be unbanned once the date is past their set expiry date.
acct->Banned = 0;
//me go boom :P
- //printf("Account %s's ban has expired.\n",acct->UsernamePtr->c_str());
+ printf("Account %s's ban has expired.\n",acct->UsernamePtr->c_str());
sLogonSQL->Execute("UPDATE accounts SET banned = 0 WHERE acct=%u",acct->AccountId);
}
acct->SetGMFlags(GMFlags.c_str());
- acct->Locale[0] = 'e';
- acct->Locale[1] = 'n';
- acct->Locale[2] = 'U';
- acct->Locale[3] = 'S';
+ acct->Locale[0] = 'e';
+ acct->Locale[1] = 'n';
+ acct->Locale[2] = 'U';
+ acct->Locale[3] = 'S';
if(strcmp(field[7].GetString(), "enUS"))
{
// non-standard language forced
@@ -201,12 +201,12 @@
acct->AccountId = field[0].GetUInt32();
acct->AccountFlags = field[5].GetUInt8();
acct->Banned = field[6].GetUInt32();
- if ((uint32)UNIXTIME > acct->Banned && acct->Banned != 0 && acct->Banned != 1) //1 = perm ban?
+ if ((uint32)UNIXTIME > acct->Banned && acct->Banned != 0 && acct->Banned > 3) //1 = perm ban?
{
- //Accounts should be unbanned once the date is past their set expiry date.
- acct->Banned = 0;
+ //Accounts should be frozen once the date is past their set expiry date.
+ acct->Banned = 2;
sLog.outDebug("Account %s's ban has expired.",acct->UsernamePtr->c_str());
- sLogonSQL->Execute("UPDATE accounts SET banned = 0 WHERE acct=%u",acct->AccountId);
+ sLogonSQL->Execute("UPDATE accounts SET banned = 2 WHERE acct=%u",acct->AccountId); //expired ban -> freeze Account
}
acct->SetGMFlags(GMFlags.c_str());
if(strcmp(field[7].GetString(), "enUS"))


Btw: when a ban expires the account will get frozen with that patch. To change that see the comment in the patch!
I'm Deutscher.^^ - Please don't mind mein scheiß englisch :P
I speak english very well - nur brockenweis und garnet schnell.
----
I'm german. plase don't mind if I write bad english. -- My Languages: Deutsch, English, (Ober-)Fränglisch


LUAppArc is a compatible improved LUAEngine for ArcEmu based on LUA++
0

#2 User is offline   Kenjiro 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 311
  • Joined: 12-June 08
  • Location:Poland

Posted 16 March 2009 - 05:17 PM

Good work, but please do not change default locale definition.
0

#3 User is offline   dark alex ~ BAWoW 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 276
  • Joined: 15-June 08

Posted 17 March 2009 - 10:58 AM

Oh shit sry I wanted to change that as I do not know much about patches and I wrote the wrong into it sorry fixing it asap
I'm Deutscher.^^ - Please don't mind mein scheiß englisch :P
I speak english very well - nur brockenweis und garnet schnell.
----
I'm german. plase don't mind if I write bad english. -- My Languages: Deutsch, English, (Ober-)Fränglisch


LUAppArc is a compatible improved LUAEngine for ArcEmu based on LUA++
0

#4 User is offline   Egari 

  • ArcEmu Lover
  • Group: Retired
  • Posts: 233
  • Joined: 08-June 08
  • Gender:Male
  • Location:The Netherlands

Posted 19 March 2009 - 11:47 AM

Doesn't this basically turn temporary bans into a permanent bans?
0

#5 User is offline   dark alex ~ BAWoW 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 276
  • Joined: 15-June 08

Posted 19 March 2009 - 12:03 PM

no. just if numbers are <= 3 it will result in not being changed. (3 is not specially used atm but I reserved it for my Server so you could change the SQL-Query to check against >2 instead of >3 but that doesn't matter here...



Oh you meant that part...

No! Wehn a ban expires it will be changed to frozen account. So you should allow the user to reenable the account through webinterface. (set banned-Field on 0 to unban/unfreeze)


Values for Table-Field banned:
0 = Active
1 = Perm. Banned
2 = Frozen
3 = Not used, so its Perm Ban, too
>3 = Temp. Ban which changes to Frozen after bantime runs out.
I'm Deutscher.^^ - Please don't mind mein scheiß englisch :P
I speak english very well - nur brockenweis und garnet schnell.
----
I'm german. plase don't mind if I write bad english. -- My Languages: Deutsch, English, (Ober-)Fränglisch


LUAppArc is a compatible improved LUAEngine for ArcEmu based on LUA++
0

#6 User is offline   Andy_ 

  • Universal Cock Master
  • PipPip
  • Group: Developers
  • Posts: 128
  • Joined: 02-September 08
  • Gender:Male

Posted 22 March 2009 - 04:31 AM

Why would you even want this error message?
0

#7 User is offline   dark alex ~ BAWoW 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 276
  • Joined: 15-June 08

Posted 22 March 2009 - 07:30 AM

I use it for my Accountmanager to give users the option to disable their account and there I don't want to have the BANNED-Message
I'm Deutscher.^^ - Please don't mind mein scheiß englisch :P
I speak english very well - nur brockenweis und garnet schnell.
----
I'm german. plase don't mind if I write bad english. -- My Languages: Deutsch, English, (Ober-)Fränglisch


LUAppArc is a compatible improved LUAEngine for ArcEmu based on LUA++
0

#8 User is offline   Terrorblade 

  • ArcEmu Lover
  • Group: Banned
  • Posts: 440
  • Joined: 07-June 08
  • Gender:Male
  • Location:Arcemu

Posted 15 April 2009 - 10:07 PM

or for servers who have "VIP" this would be useful

View PostHasbro, on 14 June 2009 - 01:07 PM, said:

I'm a flaming homosexual.
Do not advertise here by the way.

Posted Image
Posted Image

#9 User is offline   Hopla 

  • The branchmaster
  • Group: Retired
  • Posts: 947
  • Joined: 13-June 08
  • Gender:Male

Posted 16 April 2009 - 04:03 AM

Have you considered instead of setting banned using use a timeformat to deactivate the account?
0

#10 User is offline   fleshripper 

  • Newbie
  • Group: Members
  • Posts: 1
  • Joined: 01-June 09

Posted 02 June 2009 - 09:24 AM

Wouldnt it be ideal instead of using banned.. just make another fieldname in the account database? - just a suggestion
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users