def switch_processor(self): """ Handle command arguments. """ if 'r' in self.switches: if self.caller.ndb.page_recent: self.targets = check_sleepers(self.caller, self.caller.ndb.page_recent) else: self.caller.msg("No one has paged you recently.") self.message = self.args return True if self.rhs: self.message = self.rhs else: self.caller.msg( "You must specify a message to send. Did you forget the = sign?" ) return False if self.lhslist: self.targets = check_sleepers( self.caller, validate_targets(self.caller, self.lhslist, local_only=self.local_only)) else: self.caller.msg("You must specify people to send the message to.") return True
def switch_processor(self): """ Handle command arguments. """ if 'r' in self.switches: if self.caller.ndb.page_recent: self.targets = check_sleepers(self.caller, self.caller.ndb.page_recent) else: self.caller.msg("No one has paged you recently.") self.message = self.args return True if self.rhs: self.message = self.rhs else: self.caller.msg("You must specify a message to send. Did you forget the = sign?") return False if self.lhslist: self.targets = check_sleepers(self.caller, validate_targets(self.caller, self.lhslist, local_only=self.local_only)) else: self.caller.msg("You must specify people to send the message to.") return True
def display_watching(self): watching_list = self.caller.db.watching if not watching_list: self.caller.msg(ALERT % "You are not watching anyone. If you find someone interesting, or meet a friend, be sure to watch them with: watch {yYourFriend'sNameHere{n") return watching_list = check_ignores(self.caller, watching_list, silent=True) watching_list = check_sleepers(self.caller, watching_list, silent=True) watching_list = check_hiding(self.caller, watching_list) ROW_LENGTH = 4 watching_list = [watching_list[i:i+ROW_LENGTH] for i in range(0, len(watching_list), ROW_LENGTH)] if not watching_list: self.caller.msg("{cNo one you are watching is online.{n") return self.caller.msg("{cPeople online that you are watching:{n") for group in watching_list: self.caller.msg("%-20s"*len(group) % tuple(group))
def display_watching(self): watching_list = self.caller.db.watching if not watching_list: self.caller.msg( ALERT % "You are not watching anyone. If you find someone interesting, or meet a friend, be sure to watch them with: watch {yYourFriend'sNameHere{n" ) return watching_list = check_ignores(self.caller, watching_list, silent=True) watching_list = check_sleepers(self.caller, watching_list, silent=True) watching_list = check_hiding(self.caller, watching_list) ROW_LENGTH = 4 watching_list = [ watching_list[i:i + ROW_LENGTH] for i in range(0, len(watching_list), ROW_LENGTH) ] if not watching_list: self.caller.msg("{cNo one you are watching is online.{n") return self.caller.msg("{cPeople online that you are watching:{n") for group in watching_list: self.caller.msg("%-20s" * len(group) % tuple(group))