Exemple #1
0
    def send_player_notification(self, client):
        #sender, subject, message, to
        recipients = "[email protected], [email protected], "\
                        "*****@*****.**";

        message = "A player by the name of %s has logged onto VTank. \n\n Join him if you have time!" % client.get_name()\

        mailMessage = MailMessage(client.get_name(), "VTank Player Notification", message, recipients);
        success = mailMessage.mail();
        PlayerWatchdog.add_player(client.get_name())
        print "Sending mail for " + client.get_name()
        print "Current watchdog list: "
        for obj in PlayerWatchdog.watchdog_player_list.objs:
		print obj

        if not success:
            self.report("Failed to send player notification email for user %s" % (client.get_name()));
Exemple #2
0
 def SendErrorMessage(self, username, details, stacktrace, current=None):
     """
     Emails the VTank developers with a stack trace of a client crash.
     @param username: The user who encountered the error
     @param details: A description of the circumstances surrounding the
     error.
     @param stacktrace:  The error's stack trace.     
     """
     #sender, subject, message, to
     recipients = "[email protected], [email protected], "\
                  "[email protected], [email protected]";
                  
     message = "Player %s has encountered an error while playing VTank. \n\n"\
                "The circumstances were: \n%s \n \n"\
                "Stack trace: \n%s \n \n" \
                "Please investigate this issue." % (username, details, stacktrace);
                
     mailMessage = MailMessage(username, "VTank Crash Report", message, recipients);
     success = mailMessage.mail();
     
     if not success:
         self.report("Failed to send client-side error report email for user %s" % (username));
Exemple #3
0
     World.get_world().get_communicator().waitForShutdown();
 except Force_Exit_Exception, e:
     Log.log_print("CRITICAL_ERROR.log", "", "Startup failure: " + str(e));
     reporter_func("Critical error occurred: " + str(e));
     from sys import exit;
     return e.exit_code;
 except Exception, e:
     #sender, subject, message, to
     recipients = "[email protected], [email protected], "\
                  "[email protected], [email protected]";
                  
     message = "Echelon has crashed with the following error. \n\n"\
                "Stack trace: \n %s \n \n" \
                "Please investigate this issue." % (e);
                
     mailMessage = MailMessage("Echelon", "Echelon Server Crash", message, recipients);
     success = mailMessage.mail();
     
     if not success:
         Log.log_print("Failed to send server crash report!");
     
 finally:
     
     # Delete the PID file.
     try:
         os.remove('echelon.pid');
     except:
         pass;
 
 reporter_func("Echelon has shut down without issue.");