Jump to content
MakeWebGames

TheMasterGeneral

Members
  • Posts

    182
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by TheMasterGeneral

  1. Cool story bro, needs more dragons.
  2. We could tell them we want to spam, and thus nulling any of that feelz people get when they spam, and thus, they spam elsewhere. [/sarcasm]
  3. I might have read the month and day, and not the year. >__> Nonstop, to my knowledge, Skype uses IE in it (not sure where, but its there)
  4. Disable that McAffe virus you got. I know those virus scanners will eat most computers alive when they try to scan. (hell, Norton ate my FX-8350 at 4.4Ghz with 8GB with my fancy SSD and HDD RAID-10 config) when I actually used that stuff. Doesn't care that I necro'd.
  5. Other forums do a bit of moderation, however, its more like: You can only post X per 24 hours until you reach Y approved posts.
  6. Image: http://i.imgur.com/JWVs3kS.jpg I put Pusher chat onto my game, Chivalry is Dead, and I love it, so do my players. Chivalry Is Dead currently has 220 players registered and we opened our gates on Halloween 2014 Info: What happens when a man and his oaths come into conflict? When he is pledged to remain loyal to a King, but also to the smallfolk? What happens when you put a sword in the hand of the wrong, and the righteous falter? There is only one way to find out. You are a young warrior from the town of Cornrye. You must travel to different towns and meet new people. Will you protect the weak, or destroy them? The choice is yours, but remember, there's always someone waiting for you to slip up and put your guard down. Play today, by clicking here and use promo code DP2015 for three free donator days!
  7. Alright, I personally don't like anything that saves my password (but that's just me, personally), so others may find a use for this. However, out of curiosity, how does this work? Is it something similar to that auto-fill that most modern browsers have (which I hate and disable anyway) ?
  8. That also works. In a bit, I'll create a search by user id function. Few minutes!
  9. There was a few derps in the OP. (URL Links, mainly, within the code) and have been fixed and the OP has been updated.
  10. Psssh, who do you think you are, thinking we're going to code things up ourselves? :P [/sarcasm] I'll take a look at it in the morning and get it converted for all y'all.
  11. Its a more or less copy and paste from the donation logs (Which I copy and pasted from the staff notes, which when its all down and copy and pasted and whatnot, came from the attack logs :P)
  12. Info - This mod won't (in-depthly) track your users' inputs, but it'll allow you to see their browsing habits while playing the game. Involves editing files. Open staff_logs.php Find: case 'atklogs': view_attack_logs(); break; Underneath paste: case 'useraction': view_useraction_logs(); break; Go to the end of the file, and paste: function view_useraction_logs() { global $db, $ir, $c, $h, $userid; echo "<h3>User Action Logs</h3>"; if (!isset($_GET['st'])) { $_GET['st'] = 0; } $st = abs(intval($_GET['st'])); $app = 500; $q = $db->query("SELECT COUNT(`id`) FROM `user_pagelogs`"); $attacks = $db->fetch_single($q); if ($attacks == 0) { echo 'There have been no player actions yet. (Tbh, not sure how you'd get this. haha)'; return; } $pages = ceil($attacks / $app); echo 'Pages: '; for ($i = 1; $i <= $pages; $i++) { $s = ($i - 1) * $app; echo ($s == $st) ? '<b>' . $i . '</b> ' : '<a href="?action=useraction&st=' . $s . '">' . $i . '</a> '; echo ($i % 25 == 0) ? '<br />' : ''; } echo " <table width='100%' cellspacing='1' cellpadding='1' class='table'> <tr> <th>User</th> <th>Page</th> <th>Time</th> </tr> "; $q = $db->query( "SELECT `id`, `user`, `time`, `page`, `u`.`username` FROM `user_pagelogs` AS `s` INNER JOIN `users` AS `u` ON `s`.`user` = u.`userid` ORDER BY `s`.`time` DESC LIMIT $st, $app"); while ($r = $db->fetch_row($q)) { $expiry_time = time() - 43200; if ($r['time'] > $expiry_time) { $t=DateTime_Parse($r['time']); } else { $t = date('F j Y, g:i:s a', $r['time']); } echo " <tr> <td>{$r['username']} [{$r['user']}]</td> <td>{$r['page']}</td> <td>{$t}</td> </tr> "; } $db->free_result($q); echo " </table> <br /> Pages: "; for ($i = 1; $i <= $pages; $i++) { $s = ($i - 1) * $app; echo ($s == $st) ? '<b>' . $i . '</b> ' : '<a href="?action=useraction&st=' . $s . '">' . $i . '</a> '; echo ($i % 25 == 0) ? '<br />' : ''; } $mypage = floor($_GET['st'] / 500) + 1; stafflog_add("Viewed the user action logs (Page $mypage)"); } Save, upload. Open header.php, find: $IP = $db->escape($_SERVER['REMOTE_ADDR']); Paste under: //User logs addon by TheMasterGeneral $time=time(); $currentpage = $_SERVER['REQUEST_URI']; $cpage = $db->escape(str_replace("\n", "<br />",strip_tags(stripslashes($currentpage)))); $db->query("INSERT INTO `user_pagelogs` (`id`, `user`, `time`, `page`) VALUES (NULL, '{$userid}', '{$time}', '{$cpage}')"); //End addon by TMG Save, upload. SQL: CREATE TABLE IF NOT EXISTS `user_pagelogs` ( `id` bigint(99) unsigned NOT NULL AUTO_INCREMENT, `user` int(11) unsigned NOT NULL, `time` int(10) unsigned NOT NULL, `page` tinytext NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; Please note that using this on a small game over the course of a month, it resulted in a table that weighed in at 52KB. (Small game = less than 10 active players per day.) You can run a command in your day/weekly cron to delete actions that are over X age old. (That's what I'm doing now.) This will work 100% of the time the game doesn't have errors. (It'll even work if you only have require('globals.php'); in your file.) The page is sanitized before added into the DB. The only real use of this is to track your users' actions, as this won't let you see their forms (unless you have the forms sent over GET) Comments, rating, etc..
  13. Awesome! Seems to work. Thanks everyone! (Did what Sniko suggested, minus the sha512 the md5)
  14. So, recently I have added a function to my game that will allow user passwords to be encrypted in SHA-512. (Excessive? probably.) Currently, I have an option in the preferences menu to have users set their password manually, however, once I pull the plug on md5, those who have not set their passwords will be left in the dark. Is it possible (without an entire game reset) to have users be able to automatically have their password changed upon logging in? (Example, user logs in, system checks for password, if MD5, password gets changed to SHA512. Next time they log in, the MD5 test will fail, but a second test will run for SHA512.) I've taken a look at the authenticate.php file and tried a couple things, didn't really work. (Luckily I was on an offline client haha!) Anyway, anyone got experience doing something like this? I'm at wit's end. (And if its needed, MCCV2.0.5b)
  15. Apologies for the double, but it appears once you hit the chats shown limit set in settings.ini, messages will no longer be seen after a new page load. Easy fix is to set the chat_shown value to some high value. Also, the first few rooms you add in are ID'd two higher than normal. An easy fix is to just set the id manually in the DB
  16. Looks like you missed a $db, [MENTION=68406]-BRAIDZ-[/MENTION] The second error looks like you either don't have a password set, or you don't have access to the truncate command.
  17. Thanks again, sniko!
  18. Someone mind sharing all the chat commands? I found /timeout Thanks!
  19. I got it working (Thanks [MENTION=65371]sniko[/MENTION]) Firstly, open header.php: Find the function endpage() Replace: function endpage() { global $db, $ir; $query_extra = ''; if (isset($_GET['mysqldebug']) && $ir['user_level'] == 2) { $query_extra = '<br />' . implode('<br />', $db->queries); } print <<<OUT {$db->num_queries} queries{$query_extra}</body></div> OUT; require_once __DIR__ . '/lib/pusher/pusher.php'; $objPusher = new Lib\Chat\Pusher\Sniko\Pusher($db); $arrChatRooms = $objPusher->getChatRooms(); foreach ($arrChatRooms as $arrRoom) : ?> <div id="pusher-chat" style="right:<?=($arrRoom['id']*250)-245?>px"> <div class="chat-name"><?=$arrRoom['chat_name']?></div> <div class="chat-area" id="chat-area-<?=$arrRoom['id']?>"> <?php $arrChatMessages = $objPusher->getPreviousChat((int) $arrRoom['id']); foreach ($arrChatMessages as $arrMessage) { if($objPusher->mention_enable) { if( preg_match("/\s?(@{$ir['username']})\s?/", $arrMessage['message']) ) { echo '<div class=\'pusher-chat-mention\'><a href="viewuser.php?u=' . $arrMessage['user'] . '" target="_parent">' . $arrMessage['username'] . '</a> - ' . stripslashes($arrMessage['message']) . '</div>'; continue; } } echo '<div><a href="viewuser.php?u=' . $arrMessage['user'] . '" target="_parent">' . $arrMessage['username'] . '</a> - ' . stripslashes($arrMessage['message']) . '</div>'; } ?> </div> <form action="" method="POST" onsubmit="return false;" id="pusher-chat-<?=$arrRoom['id']?>"> <input type="hidden" name="chat_room" value="<?=$arrRoom['id']?>" /> <input type="text" name="pusher_message" maxlength="250" autocomplete="off" /> <input type="submit" value="Chat" style="display:none;"/> </form> </div> <?php endforeach; ?> <script> <?php echo $objPusher->generateJavascript($ir); ?> </script> </body> </html> <?php }   Upload the contents of the lib folder to your current lib folder. Add the CSS to your CSS file. Then, manually execute the SQL. Also, perfect time for game whoring a demo of sniko's lovely chat, feel free to try it out on Chivalry. Chivalry is Dead If you don't feel like making an account, use [email protected] with password demo. [/off to dinner]
  20. That makes a lot of sense. I was opening in NP+ thinking Sniko made up some new black magic PHP API.
  21. 19:30:30 You're late! :O ... I hate you [MENTION=68711]KyleMassacre[/MENTION] hahah
  22. I would, personally, like to see [MENTION=69001]Zettieee[/MENTION] 's idea. :o I would personally use it in my game.
  23. Sniko is awesome. [3] Sniko made the crafting mod that I have placed in my game. [15] Sniko reminds me of penguins. [20] Sniko is love, Sniko is life. [26] Sniko likes eating food. [30]
×
×
  • Create New...