示例#1
0
 def __init__(self, core, jid):
     OneToOneTab.__init__(self, core, jid)
     self.nick = None
     self.nick_sent = False
     self.state = 'normal'
     self.text_win = windows.TextWin()
     self._text_buffer.add_window(self.text_win)
     self.upper_bar = windows.ConversationStatusMessageWin()
     self.input = windows.MessageInput()
     # keys
     self.key_func['^I'] = self.completion
     # commands
     self.register_command(
         'version',
         self.command_version,
         desc=
         'Get the software version of the current interlocutor (usually its XMPP client and Operating System).',
         shortdesc='Get the software version of the user.')
     self.register_command('info',
                           self.command_info,
                           shortdesc='Get the status of the contact.')
     self.register_command(
         'last_activity',
         self.command_last_activity,
         usage='[jid]',
         desc='Get the last activity of the given or the current contact.',
         shortdesc='Get the activity.',
         completion=self.core.completion.last_activity)
     self.register_command('invite',
                           self.core.command.impromptu,
                           desc='Invite people into an impromptu room.',
                           shortdesc='Invite other users to the discussion',
                           completion=self.core.completion.impromptu)
     self.update_commands()
     self.update_keys()
示例#2
0
 def __init__(self, core, jid):
     OneToOneTab.__init__(self, core, jid)
     self.nick = None
     self.nick_sent = False
     self.state = 'normal'
     self.name = jid        # a conversation tab is linked to one specific full jid OR bare jid
     self.text_win = windows.TextWin()
     self._text_buffer.add_window(self.text_win)
     self.upper_bar = windows.ConversationStatusMessageWin()
     self.input = windows.MessageInput()
     # keys
     self.key_func['^I'] = self.completion
     # commands
     self.register_command('version', self.command_version,
             desc='Get the software version of the current interlocutor (usually its XMPP client and Operating System).',
             shortdesc='Get the software version of the user.')
     self.register_command('info', self.command_info,
             shortdesc='Get the status of the contact.')
     self.register_command('last_activity', self.command_last_activity,
             usage='[jid]',
             desc='Get the last activity of the given or the current contact.',
             shortdesc='Get the activity.',
             completion=self.core.completion.last_activity)
     self.register_command('add', self.command_add,
             desc='Add the current JID to your roster, ask them to'
                  ' allow you to see his presence, and allow them to'
                  ' see your presence.',
             shortdesc='Add a user to your roster.')
     self.update_commands()
     self.update_keys()
示例#3
0
 def __init__(self, core, name, nick):
     OneToOneTab.__init__(self, core, name)
     self.own_nick = nick
     self.name = name
     self.text_win = windows.TextWin()
     self._text_buffer.add_window(self.text_win)
     self.info_header = windows.PrivateInfoWin()
     self.input = windows.MessageInput()
     # keys
     self.key_func['^I'] = self.completion
     # commands
     self.register_command(
         'info',
         self.command_info,
         desc=
         'Display some information about the user in the MUC: its/his/her role, affiliation, status and status message.',
         shortdesc='Info about the user.')
     self.register_command(
         'version',
         self.command_version,
         desc=
         'Get the software version of the current interlocutor (usually its XMPP client and Operating System).',
         shortdesc='Get the software version of a jid.')
     self.resize()
     self.parent_muc = self.core.tabs.by_name_and_class(
         safeJID(name).bare, MucTab)
     self.on = True
     self.update_commands()
     self.update_keys()