┏┓┏┓╋╋╋╋╋╋╋╋╋╋┏┓╋╋╋┏┓┏┓
┃┗┫┗┳━┳┳┳┳━┳━┳┛┣━┳┳┫┗┫┗┳━┳┳┓
┃┏┫┃┃┻┫┃┃┃╋┃╋┃╋┃━┫┃┃┏┫┏┫┻┫┏┛
┗━┻┻┻━┻━━┻━┻━┻━┻━┻━┻━┻━┻━┻┛

Videos :: All Posts :: Tags :: RSS :: IMG :: About :: Test :: THE.ARMADA  


SliXMPP Python Library and mrBot Missions

August 01, 2023 — t̷h̷e̷8̷w̷o̷o̷d̷c̷u̷t̷t̷e̷r̷

Greetings fellow netizons. It is I, the woodcutter a.k.a. chunk from xmpp/irc. I wanted to ramble a bit about what I've been working on with an awesome python library for making XMPP chat bots called SliXMPP. I have had for approximately two years now a bot of my own name mrBot and at one time he was more famous than I am in XMPP as everybody love him. mrBot was my original python project for learning while exercising python and it started with errbot the multiprotocol bot framework actually. It was a little bit too in depth and took me a long time to just get the configurations to work smoothly but then after not maintaining interest in it because of it's often bugs and inconsistencies I got slacking and bored of it. What made me switch from this errbot project was that I was using a docker container, and this errbot can load in a list of MUCs or IRC channels so one docker container is good. However that container was dated, as with most images on the docker hub, I eventually learned when in IRC a spammer had completely abused it inside out and the "ACL" or supposed access control list was null, it was configured and I swore it was fine, but worked not at all. That was crappy. So i ended up figuring out from a friend Shokara, who had the idea, was to use a biboumi transport, that can use IRC in XMPP client software, and so with XMPP ACL's working I could resume using mrBot in IRC but I lost a few benefits due to the nickname/JID translation. Finally I was working on a cool plugin I called err-megaphone lol that mrBot would take from an admin only an argument, which is a message, after a command then send that whole argument to all the chats he is currently in. So it could broadcast muc/channel wide whatever. I thought this could have so much been so much fun to make and it was absolutely meant for XMPP, as mrBot lives in XMPP world, but I kept getting some dumb async error, and worked like an idiot for waaay waaay too long and gave up because errbot, I dunno, I don't think it's maintained by more than maybe one guy, and not maintained well I think. It's however a multiprotocol bot program so it's huge. I gave up and after about 3-6 more months passed and I decided that a library isn't going to hide from me so hard and get lost in object oriented programmiing aspects, in classes and namespaces and aaaaaaaaaaaaaaa omg.

Holy moley was I correct. SliXMPP is really not hard, it is no harder than errbot, in fact probably a fair bit easier and sooooo much simpler. As well for learning Pythons, it's helped me boost my level in /usr/bin/python3.10 a LOT. However anytime you want to check out or use and modify the errbot plugins I made you're welcome to find them all on git.sr.ht/~cmdr_chunk. He had a food function, where chatters could feed him things, it had 4 lists of foods, for 4 response. What I think made mrBot so awesome is the response I made for him to act like a dog because his avatar in XMPP is indeed a cute pixelate dog. "My doggo" and when jan6 kicks him from #offtopic on ircnow I get on his case "you kicked my dogg, i keel you! i will jump this fence and keel you and your family!" lmfao if you get the reference.

So in SliXMPP I've recreated and basically perfected a particular function that another popular IRC bot program called bitbot does. I guess not so popular I cant find it's code on a web search, not the OFFICIAL code at least. It's originally called "Karma" where if you quote somebody with a ++ to say nice work, or what have you, and likewise -- in case they bad person or something. I remade this SOOOOO much better. I called it Awesomes. Because it's not a person based thing, you can ++/-- any string you want using certain regex parsed characters under I think it's 22 characters or so. As well not just at the beginning of the message on first character you start it, you can ++ a string like pythons++ right here <<< mid sentence and even pythons++++++ again and it will catch them and increment / decrement the string for a saved count. It uses shelve with python, it's new python3 shelve stuff that can REALLY easily save simple parameters to a database file and be modded and read again anytime later. Anyhow, the awesomes function of mrBot does sooo much things better than bitbot and it's practical use case is fun and makes sense. I've put a lot of work into it for my SliXMPP doghouse for mrBot and it's very well done. Also I didn't mention that to use spaces instead of simply words space delimited you'd use "word"-- and even "word%%!"+++++++++++++++++++++++ and it parses correctly. We've tested this function very much in IRC and good times ^^

I will tell of more mrBot tales another time folks, this has gotten long, come to XMPP or irc.ircnow.org and find me as chunk,b0t,cmdr_coconut or cmdr_melon on #offtopic, #armada, etcetera. Bon Voyage!!

Tags: slixmpp, xmpp, python, programming, bots, mrBot