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

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


Happy updates to mrBot's doghouse!

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

Greetings internet! I thought I would explain about some of the updates I've done to my XMPP chat bot mrBot. It's funny, at one time mrBot was probably more famous than I am in XMPP world. In case you still don't know what XMPP is, that I continuously refer to, allow me to explain shortly:

XMPP (eXtensible messaging and presence protocol) is not a web program, persay, as the "web" runs primarily as websites using HTTP on ports 80,443 in the internet network among the world. So websites are the "web" and this is a chat protocol that is open source, fully open and standardized, and has matured over 22 years since the days of yahoo messenger, icq, aim, aol, etceter, those 90s chat programs you used to have to chat with people from around the world. Well, all of those are dead, except for XMPP and IRC, which in my humble opinion will never die. IRC (internet relay chat) has been around quite a lot longer than XMPP however THE CLOSEST thing to IRC that exists today is XMPP and XMPP is extensible beyond comprehension. It has what are called XEP sub protocols for features used within the XMPP master protocol and can do things that IRC typically can't or won't do, or not typically, like HTTP file uploads, publish subscribe (pubsub) services for infinite blogging, status, real time syndication type of stuff. If you've ever used Discord (gross) then you are aware that you can see your mates' status lines (under their name), whether they're online (green), away (orange), or invisible, etcetera, this is called "presence" and XMPP pioneered it FIRST.

One of the common things about open source stuff, especially as massive as XMPP as a protocol and a realm in which folks have build many many open source projects for use of it, is that rich fucks like Google and Facebook (yes, both have and did) have used the XMPP protocol for their google chat, facebook messenger, and once upon a time not too long ago you could actually connect to their networks using XMPP but not anymore! Embrace, extend, extinguish, was their intentions. Fail. The awesome thing I love about XMPP is that A: you can host your own instance, on your own domain, quite easily with a bit of linux skills, B: the entire scene is federated, just like email. You have what's called a JID (jabber ID, because XMPP was originally called Jabber) which is simply a username@domain and unlike IRC, and some other platforms, that are newer and far inferior, you can TOTALLY expect to get access to the entire federated public realm of chats. However there's a great many security features as well, and instance operators can choose to make their MUCs (multi user chats) private, moderated (require voice to chat), members only, and even enable E2EE (end to end encryption) in group chats. So it's pretty covert if you want it to considering putting your instance on the tor or the i2p network.

Yes XMPP is fully open and public and it's beyond comprehension how extensible it is, and if you get to know the folks on there you can get to know how to make the most of XMPP. A lot of folks become rather interested in computing, linux and self hosting services on linux servers. A perfect place for me.

So I've made a bot, I started building mrBot about 2 years ago with the ErrBot multi protocol chat bot framework but I was dissatisfied with the errors and the bugs. I eventually went with SliXMPP which is a mere library fully suited for XMPP bot building, among other amazing things. This has enabled me to grow my python skills a lot!

So what I am happy about today is that I have polished up some bugs with mrBot. Namely his awesomes function where he can accept a count, positive or negative, for any string almost. I also finished rebuilding some functions that I had him doing when I was using ErrBot like the rolling of dice. When you write "Roll 55" for example he'll output this:

⚂ ⚁ ⚄ ⚂ ⚄ ⚅ ⚁ ⚅ ⚄ ⚁ ⚁ ⚄ ⚁ ⚀ ⚀ ⚅ ⚃ ⚀ ⚀ ⚅ ⚄ ⚀ ⚄ ⚁ ⚃ ⚅ ⚄ ⚂ ⚀ ⚅ ⚄ ⚁ ⚅ ⚀ ⚂ ⚁ ⚂ ⚂ ⚅ ⚁ ⚁ ⚃ ⚅ ⚄ ⚁ ⚄ ⚅ ⚀ ⚄ ⚁ ⚀ ⚁ ⚄ ⚅ ⚃

A totally randomized dice for as many as you specify. I realize it's kinda dumb, but it's entertaining to me, and mrBot's entire purpose is to teach me Python language. Another thing I finished up was his "Food {food}" function where I've written pretty long lists for things you can "feed" mrBot and he'll have a cool answer to depending which category of lists you select what you guess for feeeding him. Yea mrBot is kinda like my pet, in fact he's "my dog" and I do get pissed off when people kick him from the chats LoL...

SO aside from these obviously fully useless non-utility bot functions, tht are merely entertaining at most, I have finally done something, and begun to build actually useful bot functions for mrBot. Namely network utilities. Once in a while, like today for example, we'd be in a chat talking about how another operator has got a configuration issue where his server cannot reach mine, for example. One of the common routines in this is some network command tools like ping, and some dns lookup tools, etc, that can help diagnose the network and come to a solution. Well it's sure handy, if you think about it, to be able to search DNS records, with record types, and also to be able to ping with ipv4 and ipv6 another host, via a bot in that very chat, it makes things transparent and easily accessable. So I've created today a host, a ping and a ping6 tools for mrBot. Tomorrow, if I'm feeling up to it I'd like to make the harder one which is the dig command so that that pretty much covers the basic most common tools for initial network probing.

I think, though honestly more like a really long time ago, this definitely permafries me as a NERD. Ahahaha, which is awesome, cuz I love to do this stuff and it's functional uses are fun for the future too. It's worth it to me to have spent numerous hours today to make this collection of bot upgrades, as I'm also expanding my python skills and learning new concepts and better use of the language and it's syntax ^^

A veteran web developer named Sam from Scotland, who somewhat mentored me a few years back over skype, taught me to have a practical use example for things you study if you're having a hard time understanding them. You honestly can't just brute force learn stuff without such strategies, I'm serious. You'll never get hands on experience. This is how I've enjoyed over past years creating stuff, and then going slightly really astray and building my own custom stuff that impresses, all from learning.

That's enough rambling. I had a certain long time friend in mind who I wanted to read my blog, I'm pretty sure he's not aware of it, he may not even be interested in it, but I had you in mind coatrack buddy for this cuz I think u'd be stoked. pEAcE !

Tags: chatbots, mrBot, bots, slixmpp, python, xmpp, nerd, computing, programming