[Question] re: PM command 5165

01/12/2010 21:26 bart2712#1
Is there a such thing as tempban, ban, or ipban commands for PM's for 5165 source? only ones ive seen are for LOTF, and i actually have no clue how to convert them
01/12/2010 21:59 Sp!!ke#2
#request close wrong section
01/12/2010 23:27 pro4never#3
#reported: This is a release section, not a discussion/questions section.

That being said, the commands should function very similarly between 5017 lotf and the new one. Just look at how the commands are structured in the new one and make the old ones look like the new ones in structure.


ban/ipban has been released
temp ban would require more coding such as how long the ban is for (stored in character/account db) but would be very codable.. just more difficult and not released.
01/12/2010 23:29 .Ryu#4
Quote:
Originally Posted by Tweety.4Girls View Post
#request close wrong section
Yeah no its a question it needs to be moved not closed...
#Request Move
01/12/2010 23:32 bart2712#5
oh duh...ya my bad.

And thx for the info...was wondering, am still pretty noob at coding yet, and sometimes when i tried to convert code i kept getting errors and couldnt figure it out.
01/13/2010 00:10 Arcо#6
Quote:
Originally Posted by bart2712 View Post
oh duh...ya my bad.

And thx for the info...was wondering, am still pretty noob at coding yet, and sometimes when i tried to convert code i kept getting errors and couldnt figure it out.
For temp ban you could make a new table for characters and define it as Tempban.
Then you can make a command.
/tempban CharName

Not hard.
Then after that you can code something so it will be:
if (GC.MyChar.Tempban > 0)
{
Disconnect;
}
01/13/2010 00:29 bart2712#7
hmmmm ok...you mean a hashtable?
01/13/2010 00:40 Arcо#8
Quote:
Originally Posted by bart2712 View Post
hmmmm ok...you mean a hashtable?

Not what I'm talking about at all.
I pretty much gave you a guide on how to do it lol.
01/13/2010 00:51 pro4never#9
Quote:
Originally Posted by Hepatitis C View Post
For temp ban you could make a new table for characters and define it as Tempban.
Then you can make a command.
/tempban CharName

Not hard.
Then after that you can code something so it will be:
if (GC.MyChar.Tempban > 0)
{
Disconnect;
}
Actually if I wad doing it I would do a time based system so have the database using a date time controled by the command.

That way you could do something like /tempban playername (day/week/month)

Then have the source check if the temp ban datetime is before current datetime, if it is then clear the temp ban and allow character to log.

Not that your system wouldn't work but there would be very poor handling of unbanning a character (would need a system to lower the count server side and update the database causing extra system resources to be used, etcetc)
01/13/2010 02:47 Arcо#10
Quote:
Originally Posted by pro4never View Post
Actually if I wad doing it I would do a time based system so have the database using a date time controled by the command.

That way you could do something like /tempban playername (day/week/month)

Then have the source check if the temp ban datetime is before current datetime, if it is then clear the temp ban and allow character to log.

Not that your system wouldn't work but there would be very poor handling of unbanning a character (would need a system to lower the count server side and update the database causing extra system resources to be used, etcetc)

True but it wasn't a complete idea lol.
It was just something I thought up really quick.