Example #1
0
 def lsay(self, message, fmt=" <", channel=True):
     config = db.get_config()
     mainchannel = config.irc_main_channel
     for nick, player in self.lobbyists.iteritems():
         player.tell(message, fmt)
     if channel:
         for line in wrap(message, MLW, drop_whitespace=False, replace_whitespace=False):
             self.signals['outgoing_msg'].emit(mainchannel, "- {0:{fmt}{mlw}}".format(line, fmt=fmt, mlw=MLW))
Example #2
0
 def on_global_msg(self, message):
     config = db.get_config()
     logchannel = config.irc_log_channel
     mainchannel = config.irc_main_channel
     to = self.game.players.keys()
     to.append(logchannel)
     to.append(mainchannel)
     for recipient in to:
         self.signals['outgoing_msg'].emit(recipient, message)
Example #3
0
 def fsay(self, message, fmt=" <", channel=True):
     config = db.get_config()
     logchannel = config.irc_log_channel
     if self.game:
         for nick, player in self.game.fighters.iteritems():
             player.tell(message, fmt)
         if channel:
             for line in wrap(message, MLW, drop_whitespace=False, replace_whitespace=False):
                 self.signals['outgoing_msg'].emit(logchannel, "- {0:{fmt}{mlw}}".format(line, fmt=fmt, mlw=MLW))