Use the command_args_parser in the tell plugin
This commit is contained in:
parent
4b8d66da0c
commit
41283a4ff7
1 changed files with 4 additions and 4 deletions
|
@ -20,8 +20,8 @@ This plugin defines two new commands for MUC tabs: :term:`/tell` and :term:`/unt
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from plugin import BasePlugin
|
from plugin import BasePlugin
|
||||||
|
from decorators import command_args_parser
|
||||||
import tabs
|
import tabs
|
||||||
import common
|
|
||||||
|
|
||||||
class Plugin(BasePlugin):
|
class Plugin(BasePlugin):
|
||||||
def init(self):
|
def init(self):
|
||||||
|
@ -48,13 +48,13 @@ class Plugin(BasePlugin):
|
||||||
tab.command_say("%s: %s" % (nick, i))
|
tab.command_say("%s: %s" % (nick, i))
|
||||||
del self.tabs[tab][nick]
|
del self.tabs[tab][nick]
|
||||||
|
|
||||||
|
@command_args_parser.quoted(2)
|
||||||
def command_tell(self, args):
|
def command_tell(self, args):
|
||||||
"""/tell <nick> <message>"""
|
"""/tell <nick> <message>"""
|
||||||
arg = common.shell_split(args)
|
if args is None:
|
||||||
if len(arg) != 2:
|
|
||||||
self.core.command_help('tell')
|
self.core.command_help('tell')
|
||||||
return
|
return
|
||||||
nick, msg = arg
|
nick, msg = args
|
||||||
tab = self.api.current_tab()
|
tab = self.api.current_tab()
|
||||||
if not tab in self.tabs:
|
if not tab in self.tabs:
|
||||||
self.tabs[tab] = {}
|
self.tabs[tab] = {}
|
||||||
|
|
Loading…
Reference in a new issue