rawsonj / triviabot

A simple IRC trivia bot written in python using twisted.
GNU General Public License v3.0
41 stars 52 forks source link

add option to config so "nameless's trivia bot" string will show admin name #65

Closed andy5995 closed 7 years ago

andy5995 commented 7 years ago

If you'd like this feature added, I'll take care of it.

rawsonj commented 7 years ago

How will you handle the case when there's more than 1 admin?

andy5995 commented 7 years ago

I figure I'd just pull the first name in the ADMINS list. Only 1 name can be used for the string "I'm xxx's trivia bot." That's not going to change.

Unless the string is changed:

"This trivia bot belongs to: admin1, admin2, ..."

rawsonj commented 7 years ago

We could just make a new variable called OWNER in the config file, then in the bot admins are the list of admins + OWNER, and then there's no ambiguity of who is running the bot.

andy5995 commented 7 years ago

Sounds like a good idea to me.

If I understand you right, it would look like this: OWNER = 'admin_running_the_bot' ADMINS = ['admin2','admin3']

And in trivia.py, the variable config.OWNER would be added to the config.ADMINS list

andy5995 commented 7 years ago

One thing I was confused about, now that I know you've used 'nameless' as a nick, was the intention for that string to show the author of the bot? Early on, I assumed that was meant to be manually changed by whoever is running the bot.

And actually, what I had planned for the version option (#64) and help (#12) is to show the author (you) and project home page - either when just the ?help option was used, or ?version was used, and also when the bot first joins the room.

rawsonj commented 7 years ago

In the beginning, it was one-in-the-same, and I had no intention of anything one way or another.

It makes sense to have an OWNER on any network the bot is running, and putting a link to this github repo in ?version is a good reference for anyone looking for the source of the code.