Mercurial > libervia-backend
comparison src/plugins/plugin_misc_text_commands.py @ 1171:0abce7f17782
core: a new "info" type is used in newMessage for system messages (not comming from outside)
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 05 Sep 2014 19:29:30 +0200 |
parents | 246712d2e7bc |
children | 96fb74a4714d |
comparison
equal
deleted
inserted
replaced
1170:2df6427a5299 | 1171:0abce7f17782 |
---|---|
166 if mess_data["type"] == 'groupchat': | 166 if mess_data["type"] == 'groupchat': |
167 _from = mess_data["to"].userhostJID() | 167 _from = mess_data["to"].userhostJID() |
168 else: | 168 else: |
169 _from = self.host.getJidNStream(profile)[0] | 169 _from = self.host.getJidNStream(profile)[0] |
170 | 170 |
171 self.host.bridge.newMessage(unicode(mess_data["to"]), message, mess_data['type'], unicode(_from), {}, profile=profile) | 171 self.host.bridge.newMessage(unicode(mess_data["to"]), message, C.MESS_TYPE_INFO, unicode(_from), {}, profile=profile) |
172 | 172 |
173 def feedBackWrongContext(self, command, types, mess_data, profile): | 173 def feedBackWrongContext(self, command, types, mess_data, profile): |
174 """Give a generic message to the user when a command has been used in a wrong context. | 174 """Give a generic message to the user when a command has been used in a wrong context. |
175 | 175 |
176 @param command (string): the command name (without the slash) | 176 @param command (string): the command name (without the slash) |