예제 #1
0
 def announceGenerate(self):
     DistributedObjectGlobalUD.announceGenerate(self)
     self.whiteList = TTWhiteList()
     self.toonAccess = 100
     self.offenses = {}
     self.chatMode2prefix = {1: '[MOD] ', 2: '[ADMIN] ', 3: '[SYSADMIN] '}
     self.accept('setAvatarOffenses', self.updateAvatarOffenses)
     self.accept('requestToonAccessResponse',
                 self.requestToonAccessResponse)
예제 #2
0
    def announceGenerate(self):
        DistributedObjectGlobalUD.announceGenerate(self)

        self.whiteList = TTWhiteList()
        self.muted = {}
        self.chatMode2channel = {
            1: OtpDoGlobals.OTP_MOD_CHANNEL,
            2: OtpDoGlobals.OTP_ADMIN_CHANNEL,
            3: OtpDoGlobals.OTP_SYSADMIN_CHANNEL,
        }
        self.chatMode2prefix = {1: "[MOD] ", 2: "[ADMIN] ", 3: "[SYSADMIN] "}
 def __init__(self):
     self.logWhispers = 1
     self.whiteList = None
     self.clearHistory()
     self.zeroTimeDay = time.time()
     self.zeroTimeGame = globalClock.getRealTime()
     self.floodThreshold = 10.0
     self.useWhiteListFilter = base.config.GetBool('white-list-filter-openchat', 0)
     self.lastWhisperDoId = None
     self.lastWhisperPlayerId = None
     self.lastWhisper = None
     self.SCDecoder = SCDecoders
     self.whiteList = TTWhiteList()
예제 #4
0
 def announceGenerate(self):
     DistributedObjectGlobalUD.announceGenerate(self)
     self.wantBlacklist = config.GetBool('want-blacklist', True)
     self.wantBlacklistSequence = config.GetBool('want-blacklist-sequence',
                                                 True)
     self.wantWhitelist = config.GetBool('want-whitelist', True)
     if self.wantWhitelist:
         self.whiteList = TTWhiteList()
     if self.wantBlacklist:
         self.blackList = TTBlackList()
     if self.wantBlacklistSequence:
         self.sequenceList = TTSequenceList()
     self.chatMode2channel = {
         1: OtpDoGlobals.OTP_MOD_CHANNEL,
         2: OtpDoGlobals.OTP_ADMIN_CHANNEL
     }
     self.chatMode2prefix = {1: '[MOD] ', 2: '[ADMIN] '}
예제 #5
0
 def __init__(self, parent = None, **kw):
     entryOptions = {'parent': self,
      'relief': DGG.SUNKEN,
      'scale': 0.035,
      'frameColor': (0.9, 0.9, 0.85, 0.0),
      'pos': (-0.2, 0, 0.11),
      'entryFont': OTPGlobals.getInterfaceFont(),
      'width': 8.6,
      'numLines': 5,
      'cursorKeys': 0,
      'backgroundFocus': 0,
      'suppressKeys': 0,
      'suppressMouse': 1,
      'command': self.sendChat,
      'failedCommand': self.sendFailed,
      'focus': 0,
      'text': '',
      'sortOrder': DGG.FOREGROUND_SORT_INDEX}
     ChatInputWhiteListFrame.__init__(self, entryOptions, parent, **kw)
     self.whiteList = TTWhiteList()
     base.whiteList = self.whiteList
     base.ttwl = self
     self.autoOff = 1
     self.sendBy = 'Data'
     self.prefilter = 0
     self.promoteWhiteList = 1
     self.typeGrabbed = 0
     self.deactivate()
     gui = loader.loadModel('phase_3.5/models/gui/chat_input_gui')
     self.chatFrame = DirectFrame(parent=self, image=gui.find('**/Chat_Bx_FNL'), relief=None, pos=(0.0, 0, 0.0), state=DGG.NORMAL)
     self.chatButton = DirectButton(parent=self.chatFrame, image=(gui.find('**/ChtBx_ChtBtn_UP'), gui.find('**/ChtBx_ChtBtn_DN'), gui.find('**/ChtBx_ChtBtn_RLVR')), pos=(0.182, 0, -0.088), relief=None, text=('', OTPLocalizer.ChatInputNormalSayIt, OTPLocalizer.ChatInputNormalSayIt), text_scale=0.06, text_fg=Vec4(1, 1, 1, 1), text_shadow=Vec4(0, 0, 0, 1), text_pos=(0, -0.09), textMayChange=0, command=self.chatButtonPressed)
     self.cancelButton = DirectButton(parent=self.chatFrame, image=(gui.find('**/CloseBtn_UP'), gui.find('**/CloseBtn_DN'), gui.find('**/CloseBtn_Rllvr')), pos=(-0.151, 0, -0.088), relief=None, text=('', OTPLocalizer.ChatInputNormalCancel, OTPLocalizer.ChatInputNormalCancel), text_scale=0.06, text_fg=Vec4(1, 1, 1, 1), text_shadow=Vec4(0, 0, 0, 1), text_pos=(0, -0.09), textMayChange=0, command=self.cancelButtonPressed)
     self.whisperLabel = DirectLabel(parent=self.chatFrame, pos=(0.02, 0, 0.23), relief=DGG.FLAT, frameColor=(1, 1, 0.5, 1), frameSize=(-0.23,
      0.23,
      -0.07,
      0.05), text=OTPLocalizer.ChatInputNormalWhisper, text_scale=0.04, text_fg=Vec4(0, 0, 0, 1), text_wordwrap=9.5, textMayChange=1)
     self.chatEntry.bind(DGG.OVERFLOW, self.chatOverflow)
     self.chatEntry.bind(DGG.TYPE, self.typeCallback)
     self.trueFriendChat = 0
     if base.config.GetBool('whisper-to-nearby-true-friends', 1):
         self.accept(self.TFToggleKey, self.shiftPressed)
         
     return
예제 #6
0
    def announceGenerate(self):
        DistributedObjectGlobalUD.announceGenerate(self)
        self.wantBlacklistSequence = config.GetBool('want-blacklist-sequence',
                                                    True)
        self.wantWhitelist = config.GetBool('want-whitelist', True)
        if self.wantWhitelist:
            self.whiteList = TTWhiteList()

    #  if self.wantBlacklistSequence:
    #self.sequenceList = TTSequenceList()
        self.chatMode2channel = {
            1: OtpDoGlobals.OTP_MOD_CHANNEL,
            2: OtpDoGlobals.OTP_ADMIN_CHANNEL,
            3: OtpDoGlobals.OTP_SYSADMIN_CHANNEL,
        }
        self.chatMode2prefix = {
            1: "[MOD] ",
            2: "[ADMIN] ",
            3: "[SYSADMIN] ",
        }

        self.muted = {}
예제 #7
0
    def __init__(self, parent = None, **kw):
        entryOptions = {
            'parent' : self,
            'relief': DGG.SUNKEN,
            'scale': 0.05,
            #'frameSize' : (-0.2, 25.3, -0.5, 1.2),
            #'borderWidth' : (0.1, 0.1),
            'frameColor' : (0.9, 0.9, 0.85, 0.0),
            'pos' : (-0.2,0,0.11),
            'entryFont' : OTPGlobals.getInterfaceFont(),
            'width': 8.6,
            'numLines' : 3,
            'cursorKeys' : 0,
            'backgroundFocus' : 0,
            'suppressKeys' : 0,
            'suppressMouse' : 1,
            'command' : self.sendChat,
            'failedCommand': self.sendFailed,
            'focus' : 0,
            'text' : '',
            'sortOrder' : DGG.FOREGROUND_SORT_INDEX,
            }
        ChatInputWhiteListFrame.__init__(self, entryOptions, parent, **kw)
        #self.initialiseoptions(TTChatInputWhiteList)
        self.whiteList = TTWhiteList()
        base.whiteList = self.whiteList
        base.ttwl = self


        self.autoOff = 1
        self.sendBy = "Data"
        self.prefilter = 0
        self.promoteWhiteList = 1
        self.typeGrabbed = 0

        #self.request("off")
        self.deactivate()

        gui = loader.loadModel("phase_3.5/models/gui/chat_input_gui")

        self.chatFrame = DirectFrame(
            parent = self,
            image = gui.find("**/Chat_Bx_FNL"),
            relief = None,
            pos = (0.0, 0, 0.0),
            state = DGG.NORMAL,
            #sortOrder = DGG.FOREGROUND_SORT_INDEX,
            )

        #self.chatFrame.hide()

        self.chatButton = DirectButton(
            parent = self.chatFrame,
            image = (gui.find("**/ChtBx_ChtBtn_UP"),
                     gui.find("**/ChtBx_ChtBtn_DN"),
                     gui.find("**/ChtBx_ChtBtn_RLVR"),
                     ),
            pos = (0.182, 0, -0.088),
            relief = None,
            text = ("",
                    OTPLocalizer.ChatInputNormalSayIt,
                    OTPLocalizer.ChatInputNormalSayIt),
            text_scale = 0.06,
            text_fg = Vec4(1,1,1,1),
            text_shadow = Vec4(0,0,0,1),
            text_pos = (0,-0.09),
            textMayChange = 0,
            command = self.chatButtonPressed,
            )

        self.cancelButton = DirectButton(
            parent = self.chatFrame,
            image = (gui.find("**/CloseBtn_UP"),
                     gui.find("**/CloseBtn_DN"),
                     gui.find("**/CloseBtn_Rllvr"),
                     ),
            pos = (-0.151, 0, -0.088),
            relief = None,
            text = ("",
                    OTPLocalizer.ChatInputNormalCancel,
                    OTPLocalizer.ChatInputNormalCancel),
            text_scale = 0.06,
            text_fg = Vec4(1,1,1,1),
            text_shadow = Vec4(0,0,0,1),
            text_pos = (0,-0.09),
            textMayChange = 0,
            command = self.cancelButtonPressed,
            )

        self.whisperLabel = DirectLabel(
            parent = self.chatFrame,
            pos = (0.02, 0, 0.23),
            relief = DGG.FLAT,
            frameColor = (1,1,0.5,1),
            frameSize = (-0.23, 0.23, -0.07, 0.05),
            text = OTPLocalizer.ChatInputNormalWhisper,
            text_scale = 0.04,
            text_fg = Vec4(0,0,0,1),
            text_wordwrap = 9.5,
            textMayChange = 1,
            )
        #self.whisperLabel.hide()
        #self.setPos(-0.35, 0.0, 0.7)

        self.chatEntry.bind(DGG.OVERFLOW, self.chatOverflow)
        self.chatEntry.bind(DGG.TYPE, self.typeCallback)
        # self.accept("typeEntryGrab", self.handleTypeGrab)

        self.trueFriendChat = 0
        if  ConfigVariableBool('whisper-to-nearby-true-friends', 1).getValue():
            self.accept(self.TFToggleKey, self.shiftPressed)
예제 #8
0
    def announceGenerate(self):
        DistributedObjectGlobalUD.announceGenerate(self)

        self.whiteList = TTWhiteList()
예제 #9
0
 def announceGenerate(self):
     DistributedObjectGlobalUD.announceGenerate(self)
     self.wantWhiteList = config.GetBool('want-whitelist', True)
     if self.wantWhiteList:
         self.whiteList = TTWhiteList()
예제 #10
0
    def announceGenerate(self):
        DistributedObjectGlobalUD.announceGenerate(self)

        self.whiteList = TTWhiteList()
        self.chatMode2prefix = {1: "[MOD] ", 2: "[ADMIN] ", 3: "[SYSADMIN] "}