Giter Club home page Giter Club logo

format_bridge_bot_output's Introduction

Fork of format_bridge_bot_output

This is a fork of the format_bridge_out_bot_output weechat script

Original README

Intercepts messages before WeeChat displays them and if found to have been sent by a bridge bot proceeds to alter the message so that when displayed it has the appearance of being sent by a native IRC user.

I (ndlr: the author of the original repository) wrote a blog post to accompany this script when I first released it in November 2018: WeeChat IRC Client - Formatting Bridge Bot Output

Using this for the #ocaml discord bot

Downlaod the script:

wget -O ~/.weechat/python/format_bridge_bot_output.py \
  https://raw.githubusercontent.com/Gbury/format_bridge_bot_output/master/format_bridge_bot_output/format_bridge_bot_output.py

(Optional) Link it for auto-loading:

cd ~/.weechat/python/autoload && ln -s ../format_bridge_bot_output.py

Load the script in weechat:

/script load format_bridge_bot_output.py

In weechat, setup the script for your desired channel:

/format_bridge_bot_output_add-server-channel-botnicks-nicklength <group_name> <server_name> <channel_name> <bot_name> <max_nick_length>
/format_bridge_bot_output_add-regex <group_name> <regexp>

Note that <group_name> is an arbitrary name you can choose to refer to the configuration of the script for the particular combination of server, channel, and bot name.

For instance, on my setup, the commands looked like:

/format_bridge_bot_output_add-server-channel-botnicks-nicklength ocamldiscord libera #ocaml d_bot 15
/format_bridge_bot_output_add-regex ocamldiscord (?P<action>(?:^[\x01]ACTION |^))<(?P<nick>.+?)> (?P<text>.*)

Note

Fomr what I can tell, this script may not interact as well as desired with other scripts, but the main limitation I saw up to now is that nicks in rewritten messages are not colorized, which is sad, but in my opinion still better than not rewriting the messages.

format_bridge_bot_output's People

Contributors

gbury avatar thecliguy avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.