-
Posts
785 -
Joined
-
Last visited
-
Days Won
79
Content Type
Profiles
Forums
Events
Everything posted by SRB
-
I know, shockinz!
-
I think there is still room in the market. That is why I, along with a friend or 2, will be releasing one shortly. What does it do over current releases? Shows people that using 3rd party applications can benefit a game and increase speed. * separation of logic * abstraction classes * templating system * improved mail functions * server logging Just a few things that will be implemented. Won't be very useful for the people stuck in the mc code style of programming, but if willing to research, play and learn, will put them in better standing to gain the experience needed to be able to work in a commercial programming environment.
-
I de-forked it - I was half way through editing it all, then figured it was too much. I don't have anything on there - will have soon. Well, on bitbucket. http://www.github.com/LukeMarlow is me though.
-
Forked. -2short
-
You can't hear him talk? About as much sense as calling out for calling out people based on age, I think.
-
Except in the SPAM PM thread I started, the original post I did was from a guy saying Ben wanted access to the site, which, if true, renders his claims of not asking, false.
-
And yet; A file check says it's still not there. Please upload a file "mwg.txt" with the content; Guest Rocks
-
The point where I come across as unapproachable and an ass ;)
-
Because you have shown so much knowledge in the field, to be able to offer help, right? Come on now, been here 5 minutes and want cpanel log in's etc?
-
You been drinking, bro? :P
-
Anybody else get them? Here is one, with my reply, from today alone. ------------------------------------------------- And at what point did I state, anywhere, that I am your personal help desk? Post it on the forums and I'm sure someone will help you at some point. Spamming me only annoys me and makes me want to give you malicious shell commands to shut your pages down. Go away. ------------------------------------------------- Come on, share yours :D
-
Slightly my fault - I omitted the first bracket before array_key_exists The joys of untested code :D Can't debug the code, but you expect shell commands to be inside the knowledge base? Wishful thinking :P
-
I read this and was bored, so I just wrote this. Should be enough here to get you started (All code should be in place and correct - I've not tested it) You **should** only need to add your own html layout. <?php include_once('globals_nonauth.php'); echo '<h3>Password Reset</h3>'; // Check if the form has been posted. if ($_SERVER['REQUEST_METHOD'] == "POST") { // Check email existence and format $email = (array_key_exists('email', $_POST) && is_string($_POST['email']) && filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) ? mysql_real_escape_string(substr($_POST['email'], 0, 255)) : FALSE ; if ($email) { // Check the email is linked to an account $sql = "SELECT `userid`, `username`, `email` FROM `users` WHERE `email` = '{$email}';"; $run = mysql_query($sql); if (mysql_num_rows($run) == 1) { // Give the data a variable to use $result = mysql_fetch_assoc($run); // Set a new password, of random length, using variable length and size, as a salt (of sorts) $newpass = substr(MD5($result['userid'] . $result['username'] . $result['email'] . time()), 0, mt_rand(10,30)); // Update password to temp password (above) $sql = "UPDATE `users` SET `userpass` = '{$newpass}' WHERE `userid` = '{$result['userid']}';"; $db->query($sql); // Set email information; $from_name = "GameName"; $from_mail = "[email protected]"; $send_mail = $result['email']; $subject = "GameName - Password reset"; $message = "We recently had a request from our website, GameName.com, to provide you with a new password.\n\r" . "As per the request, our system has generated a new password for you, which we advise you to change once you log in.\n\r" . "Your password is: " . $newpass . "\n\r" . "~" . $from_name; // Create the email; $headers = array(); $headers[] = "MIME-Version: 1.0"; $headers[] = "Content-type: text/plain; charset=iso-8859-1"; $headers[] = "From: " . $from_name . " <" . $from_mail . ">"; $headers[] = "Reply-To: NoReply <[email protected]>"; $headers[] = "Subject: {$subject}"; $headers[] = "X-Mailer: PHP/".phpversion(); mail($send_mail, $subject, $message, implode("\r\n", $headers)); // Give information echo '<p>A new password has been generated and emailed to you. Please check your email and remember to change your password once you have logged in.</p>'; } else { echo '<p>No account with that email exists.</p>'; } } else { echo '<p>You did not supply a valid email address.</p>'; } echo '<hr />'; } echo '<p>Enter your email to resend a password.</p> <form action="" method="post"> <input type="text" name="email" value="" placeholder="Email here"> <p> <button>Send</button> </p> </form>'; $h->endpage();
-
I'm interested in where this could go- with a little more info on full job spec, I could consider if I have the time for it. Feel free to send me a PM. I'm sure there are enough noobs on this forum to vouch for what I can do :D
-
I kind of like the term. It's growing on me. It's like; A chicken free, chicken and mushroom pie. A non-chocolate, chocolate teapot. Or even a sugar free, sugar cube. Oxymorons, indeed.
-
You mean; "Would you remove crons and work from timestamps?" Quite easy to just work from timestamps, as long as you write it correctly and think thoroughly about where to activate updates. Can be a long task to completely remove them though. Replacing a cron with a cron, however, doesn't make much sense, since you would have to run more resources to check if it's due to run on all active players. That's an extra query, per player, every page load, to check the files. May as well just let the system run it once on command.
-
This differ much from my system? Can't see the images, maybe because I'm on mobile, so can't see myself
-
Might be worth noting that you can set the staff level by giving the user_level to the staff account. I know some won't see it straight from the code, so figured I'd set that straight :)
-
To add to Dave's as I have a friend who wrote a bot for them, so can relate to this; Check what they are doing also with some stats. For example; Current brave; Crime ID; A bot can be set to run XX crime only after having XX brave, which means they'd do no lower crimes, but let the bot read the screen and determine when to do the crime with XX brave.
-
Ok, so this code is pretty basic and if someone required more from it, it could be extended a fair amount, but here goes a simple script (That surprisingly hasn't been posted before) Query ALTER TABLE `users` ADD `staff_id` INT(11) UNSIGNED not null default '0'; switch.php <?php include_once('globals.php'); $sql = "SELECT `userid`, `username` FROM `users` WHERE (`userid` = '{$ir['staff_id']}' OR `staff_id` = '{$ir['userid']}') LIMIT 1"; $run = mysql_query($sql); if (mysql_num_rows($run) == 1) { $info = mysql_fetch_assoc($run); echo '<h3>Account changed to ' . htmlentities($info['username']) . '</h3>'; $_SESSION['userid'] = $info['userid']; } else { echo 'Move along. Nothing to see here.'; } $h->endpage(); exit; Link $sql = "SELECT `userid`, `username` FROM `users` WHERE (`userid` = '{$ir['staff_id']}' OR `staff_id` = '{$ir['userid']}') LIMIT 1"; $run = mysql_query($sql); if (mysql_num_rows($run) == 1) { $info = mysql_fetch_assoc($run); echo '<a href="switch.php">Switch to ' . htmlentities($info['username'], ENT_QUOTES, "UTF-8") . '</a>'; } How to use? It's pretty simple. If ID 1 is an admin account and you would like ID 43 to be able to run both (admin and player accounts), you just need make `staff_id` = 43 for `userid` = 1; UPDATE `users` SET `staff_id` = 43 WHERE `userid` = 1; Why use this? If, like me, you dislike staff using their main account to play AND be staff, this works as they do not need to remember 2 different log in's (Hell, they don't even need access to password on staff account!) This also makes it harder for players to yell the normal "Staff are cheating - secretary is number 1 in all stats!" etc Potential updates for people; - IP Logging - Require Auth code (4 digit pin like banks maybe?) - Function to block certain pages for staff (Preferences etc); (Hint: IF (`staff_id` > 0) ...) Anyway, as I said, basic. Does what it says on the tin though.
-
I suppose you never made a mistake when you were learning? Come on now, don't be a dick... that's my job and I'm not resigning any time soon.
-
Zettie, there's only one flaw with the domain and that is memorability. Your game domain should be easy to remember, to keep your players coming back. If your players have to google the game name and google corrects warz to wars, the first page of results is your competition. Logically, it makes no sense. In theory, it can be what he wants. The fact remains that a game is user based and for the users, you should make it simple to remember and find
-
Where do you host your web game and how do you keep it fast?
SRB replied to john.'s topic in Game Projects
DO rocks. Not for the feint hearted that don't wish to play at command line level though. Note IF in doubt, always use: rm -rf / In the command line! Edit No, seriously, DONT! -
Dude, I'd just like to say thank you for choosing a game name like you have AND choosing spelling it poorly. I totally encourage you to buy the domain and run a game from it... because... I was given the domain and codes for a pimp game recently, which I have set live, but is undergoing major overhauls before a future reset. Just happens to be a pimp game using both the words "pimp" and "wars". So when people forget your game name or it's spelling and google for "pimp wars" - my domain is on the first page. Look forward to the sign ups you will get me :D Might be because he doesn't own the domain -> Source Really, Ian? You started so well too, with; Just to end up doing the same as everybody else has done, which you aimed the above comment at, with; So, as admin, you can slander/slate/point out flaws and it's deemed appropriate, but as a normal person the same direction of comment is worthy of admin throwing some weight around? Yeah, seems legit.