A weechat plugin to send a user's messages with corrections applied when they send a correction string (ex: s/typo/replacement).
put the apply_corrections.py to ~/.weechat/python/autoload
and then restart
the weechat.
when you have send a wrong message to the channer,you could type 's/typo/replacement' to correct your message
│11:11 yinflying | this is a appply_corrections
│11:11 yinflying | s/appply/apply <- Here are you have typed
│11:11 yinflying | this is a apply_corrections[repalce] <- Here is corrected msg
Interval, in seconds, between each check for expired messages. If set to 0 no check will be performed and all messages will be saved indefinitely.
Time, in seconds, before a message is expired. If set to 0 messages will never expire.
Number of messages to store per nick. If set to 0 all messages will be saved until they expire.
Format string for the printed corrections (Default: "[corrected][tag]"). Variables allowed:
- [nick]: The nick of the person who sent the messages.
- [corrected]: The corrected text of the previous message(s).
- [correction]: The correction (format: s/typo/replacement).
- [original]: The original message before correction.
- [pattern]: The "typo" portion of the correction.
- [replacement]: The "replacement" portion of the correction.
- [timestamp]: The timestamp of the original message.
- [tag]: customized tag string message,defaut:[replace]
Maximum number of lines to correct and print to the buffer. If set to 0 all lines that match the pattern will be printed.
Note: Setting check_every, data_timeout, message_limit, or some combination thereof to 0's will eat a lot of memory very quickly as it will drastically increase the size of the dictionary holding previous messages. Likewise, setting print_limit to 0 with a large number of saved messages will quickly fill your screen with a bunch of stuff should someone submit a generic enough correction string.
Customeized tag string message for print_format [tag]
control the valid nicks for applying correction
Default: "0"
Variables allowed:
"0" :allowed all nicks in all channel
"nick1,nick2,nick3" :allowed these nicks(usually contain yourself)