예제 #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()));
예제 #2
0
 def feed_watchdog(self, client):        
     if PlayerWatchdog.needs_mail(client.get_name()):
         self.send_player_notification(client);