#gbot - IRC bot in Python
28 Jan 2019
January 28, 2019
Right from day one of my training in #dgplug, I always wanted to know, "How batul, the IRC bot in #dgplug" was developed". And now today, When I myself had registered a channel #GirlScriptSnp on irc.freenode.net for conducting GirlScript Sonipat training sessions. The first thought was to just create and load a bot which was as powerful as batul.
So, now, finally, I came up with my version of batul, which is gbot. Unlike batul, which was entirely coded in GoLang, I have developed gbot in Python.
gbot is powerful than a normal(intermediate-level) IRC bot and provides a lot of options which can be expanded very easily.
Summarizing here the operations available in gbot:
- Besides, connecting to a freenode-server and replying to the "PING" messages of a server with "PONG", gbot is capable of capturing/logging all the IRC messages in the console.
- It can check whether a nick has an admin status or not.
- If a nick has admin status, it can access various privileged commands such as #startclass and #endclass(to start and end a session, respectively, in the IRC.)
- Besides, with admin access, a nick can add (nick #addop) or remove (nick #removeopp) operators from the channel too.
- gbot maintains a queue of the students who are raising their hands by typing "!" to ask their questions in the channel and call them whenever their turn shows up.
- It can inform the participating students to wait if they try to re-queue themselves in the questions queue.
- The mentor with admin access can answer the student's queries by typing "next" and popping out the student's nick from the question's queue in FIFO fashion.
- gbot can also inform students when there is no session going on in the channel.
- And lastly, as every bot can always do, it can reply with a Hello! message specifically to the nick saying "hi" to it.
That's all for now. Looking forward to adding more functionalities into it.
You can check the entire-source code here.
Till next time, o/