weechat-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Weechat-dev] [task #11732] new function to avoid sending unwanted comma


From: nesthib
Subject: [Weechat-dev] [task #11732] new function to avoid sending unwanted commands as PRIVMSG
Date: Thu, 12 Jan 2012 12:26:29 +0000
User-agent: Mozilla/5.0 (Ubuntu; X11; Linux x86_64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1

URL:
  <http://savannah.nongnu.org/task/?11732>

                 Summary: new function to avoid sending unwanted commands as
PRIVMSG
                 Project: WeeChat
            Submitted by: nesthib
            Submitted on: jeu. 12 janv. 2012 12:26:29 GMT
                Category: commands
         Should Start On: jeu. 12 janv. 2012 00:00:00 GMT
   Should be Finished on: jeu. 12 janv. 2012 00:00:00 GMT
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
        Percent Complete: 0%
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
                IRC nick: nesthib

    _______________________________________________________

Details:

I suggest a new function to avoid sending unwanted commands as PRIVMSG in
channel buffers. There should be an option to detect input starting with
spaces then / and warn the user.
As for the option weechat.look.paste_max_lines, when pressing enter after
writing a line starting with blanks then "/", weechat should ask something
like:
[send ctrl+y] [cancel ctrl+n] [strip blanks ctrl+…]

where "send" would force sending the message, "cancel" would allow to come
back to prompt and modify the line and "strip" would remove the unwanted
characters (i.e. exec the command and not send PRIVMSG)

An option (boolean) should be added to allow the function to be
enabled/disabled.

further idea (optional):
An other option (string) may be added to allow the customization of the regexp
used to detect the pattern.
e.g. "( +)/.*" would mean that warning is displayed for lines starting with
blanks then / then anything, and the parenthesis would define the pattern to
be removed.
This would allow to define more generic patterns as "([a-Z ])/.*nickserv.*"

or maybe the string should just consider the pattern to be removed and be
detected if being before the first "/" of the input (so would be just " *" or
"([a-Z ])")




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?11732>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]