+/* Plugins should be part of the simulation too!
+function newFave($u)
+{
+ global $userprefix;
+ global $groupprefix;
+
+ $userNumber = rand(0, $u - 1);
+
+ $userNick = sprintf('%s%d', $userprefix, $userNumber);
+
+ $user = User::getKV('nickname', $userNick);
+
+ if (empty($user)) {
+ throw new Exception("Can't find user '$userNick'.");
+ }
+
+ // NB: it's OK to like your own stuff!
+
+ $otherNumber = rand(0, $u - 1);
+
+ $otherNick = sprintf('%s%d', $userprefix, $otherNumber);
+
+ $other = User::getKV('nickname', $otherNick);
+
+ if (empty($other)) {
+ throw new Exception("Can't find user '$otherNick'.");
+ }
+
+ $notices = $other->getNotices()->fetchAll();
+
+ if (count($notices) == 0) {
+ return;
+ }
+
+ $idx = rand(0, count($notices) - 1);
+
+ $notice = $notices[$idx];
+
+ if ($user->hasFave($notice)) {
+ return;
+ }
+
+ Fave::addNew($user->getProfile(), $notice);
+}*/
+