Ticket #2616: fix_dup_amsg.diff
| File fix_dup_amsg.diff, 1.8 kB (added by kanru, 4 months ago) |
|---|
-
plugins_base/Commands.py
old new 115 115 _('Set your psm')) 116 116 self.Slash.register('amsg', self.slash_amsg, 117 117 _('Send a message to your opened conversations')) 118 self.Slash.register('amsg', self.slash_amsg,119 _('Send a message to your opened conversations'))120 118 self.Slash.register('exec', self.slash_exec, 121 119 _('Executes a system command and sends it to current conversation')) 122 120 self.enabled = True … … 201 199 slash_action.outputText(_('Error: missing text parameter')) 202 200 slash_action.outputText(_('USAGE: /amsg <text>')) 203 201 204 def slash_amsg(self, slash_action):205 """Sends a message to every opened conversation"""206 #Let's get parameters207 params = slash_action.getParams()208 if params :209 #if there are parameters210 for i, j in self.controller.conversationManager.conversations :211 j.sendMessage(params)212 else:213 #if there are not parameters214 slash_action.outputText(_('Error: missing text parameter'))215 slash_action.outputText(_('USAGE: /amsg <text>'))216 217 202 def slash_exec(self, slash_action): 218 203 """Run shell command and send it to conversation""" 219 204 params = slash_action.getParams() … … 238 223 self.Slash.unregister('clear') 239 224 self.Slash.unregister('psm') 240 225 self.Slash.unregister('amsg') 241 self.Slash.unregister('amsg')242 226 self.Slash.unregister('exec') 243 227 self.enabled = False 244 228
