#NEWLINE# @ irc3 . event ( '(@(?P<tags>\\S+) )?:(?P<mask>\\S+) PRIVMSG (?P<target>\\S+) :{re_cmd}(?P<cmd>\\w+)(\\s(?P<data>\\S.*)|(\\s*$))' ) #NEWLINE# def on_command( self , cmd , mask = None , target = None , client = None , **kw ) : #NEWLINE# #INDENT# if ( not self . case_sensitive ) : #NEWLINE# #INDENT# cmd = cmd . lower ( ) #NEWLINE# #UNINDENT# ( predicates , meth ) = self . get ( cmd , ( None , None ) ) #NEWLINE# if ( client is not None ) : #NEWLINE# #INDENT# if ( ( predicates . get ( 'public' , True ) is False ) and target . is_channel ) : #NEWLINE# #INDENT# self . context . privmsg ( mask . nick , ( 'You can only use the %r command in private.' % str ( cmd ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return self . do_command ( predicates , meth , mask , target , ** kw )