Un bridge entre la shout et l'IRC
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Eragon ce6a7e1ba4
IRC->Shoutbox: Add support for ACTION (aka /me)
2 months ago
.gitignore Add users to git repo 1 year ago
README.md Add README 1 year ago
bridge.py IRC->Shoutbox: Add support for ACTION (aka /me) 2 months ago
irc.py I hope that this will fix the loop when the IRC is disconnected 3 months ago
shoutbox.py Add regex that exclude non-valid char 3 months ago
users.py users: Add Mb88 3 months ago

README.md

Shoutbridge

Le bot qui lie l'IRC a la v4

Le bridge est un bot dont le but est de lier l'IRC avec la shoutbox de la v4.

Installation

$ git clone https://gitea.planet-casio.com/devs/shoutbridge.git
$ git submodule init
$ git submodule update

Configuration

Identifiants

Pour connecter un compte, il faut créer un fichier cookies.py contenant les identifiants du compte et le cookie de session de la v4. Vous pouvez utiliser un compte quelconque, mais le say-as ne fonctionnera pas.

# secrets.py
# The v4 cookie for the bot
cookies = {
    'remember_web_59ba36addc2b2f9401580f014c7f58ea4e30989d': '',
    'XSRF-TOKEN': '',
    'planete_casio_session': '',
    'session_code': ''
}

Pour la connexion a l'IRC il faut un fichier sasl.py contenant les identifiants SASL pour l'IRC. N'importe quel compte peut être utilisé ici

# sasl.py
# The v5 account informations
nick = "Username"
password = "P@ssword"

Conversion des noms d'utilisateurs et say-as

Pour la conversion des noms d'utilisateurs et le say-as sur la Shoutbox il faut un fichier users.py qui contient.

users = [
    ("Dark Storm", "Darks"),
    ("Dark Storm", "Eldeberen"),
    ("Breizh_craft", "Breizh"),
    ("Eragon", "eragon")
]

Lancement

Pour lancer le bot, exécutez simplement bridge.py.

$ python bridge.py
2022-03-10 10:35:32,310 [INFO] <irc.py> callback: added callback handle_irc
2022-03-10 10:35:32,311 [INFO] <shoutbox.py> callback: added callback handle_shoutbox
2022-03-10 10:35:32,436 [INFO] <irc.py> join: joined #hs
2022-03-10 10:35:32,436 [INFO] <irc.py> join: joined #projets
2022-03-10 10:35:32,436 [INFO] <irc.py> join: joined #annonces
2022-03-10 10:37:52,310 [INFO] <irc.py> run: received eragon to #projets: Darks, faudra que tu regarde mais une fois sur 4 j'ai un SIGSEGV, j'ai aussi le thread IRC (je pense) qui plante/timeout et se connecte jamais, il y a aussi le bug du thread Shoutbox qui crash quand la requète répond pas assez vite
2022-03-10 10:37:52,310 [INFO] <irc.py> run: matched <lambda>
2022-03-10 10:38:08,118 [INFO] <shoutbox.py> handler: matched <lambda>
[...]