Giter VIP home page Giter VIP logo

pleaseopme's Introduction

PleaseOpMe

Auto Op bot for IRC.

Inspired by EFnet's CHANFIX, this bot attempts to keep operator or voice mode to users in the channel.

Install

Requires:

  • Python 3+
  • IRC module 19.0
  • SQLAlchemy module

Install Python, then use pip to install the Python libraries:

    pip3 install --user irc sqlalchemy

Then, set up the bot by editing the sample configuration file and run it:

    python3 pleaseopme.py my_config_file.ini

Note: This script was formerly a Willie Bot module. It is now a standalone script for stability reasons. You may still use the older versions by navigating to the older branch in the Git repository.

Usage

To get the bot to join a channel, use the /invite command.

The bot will monitor active users with operator (@) or voice (+) and give them back when they rejoin if they fit the criteria. The user must

  • have the same hostmask (same nick, user, and host),
  • have said (or /me) something so the bot knows the user's hostmask if the bot has not done a WHOIS/WHO query on the user yet,
  • have op or voice for at least 60 seconds,
  • and be back in the channel within 24 hours.

Channel operators

To force the bot to leave, /kick the bot.

To force it to clear its privilege table for the current channel, message the bot revokeall (say BOT_NAME: revokeall).

Bot admin

Password authentication is done by sending a private message with auth PASSWORD. The password is cached for 5 minutes.

To force the bot to leave a channel, send a private message to the bot with part CHANNEL_NAME.

To get ops, message the bot op (say BOT_NAME: op) in the channel.

To get a list of currently joined channels, send a private message channels .

Tips

  • The bot may occasionally need to be restarted due to bugs or updates. Run at least two bots with each on different servers and connected to a different IRC server.
  • Start the bot with a daemon system such as Upstart or Systemd and configure it to restart if the bot dies (with appropriate restart intervals if applicable).
  • If the daemon system supports delays, include a delay of about 45 to 60 seconds to avoid flooding the server. Otherwise, use the sleep command as part of the start up script.

Credits

pleaseopme's People

Contributors

chfoo avatar

Stargazers

 avatar  avatar Yongmin avatar  avatar

Watchers

 avatar  avatar James Cloos avatar

pleaseopme's Issues

Users aren't getting opped

I'm not able to get the bot to op known users when they join a channel. I speak in the channel, wait 60 seconds, and see in the bot logs that its whoising users but nothing happens when a known users joins a channel.

Running your latest code and willie 5.4.1 on python 3.4.2.

Connecting to irc.servercentral.net:9999...
Connected.
INFO:pleaseopme:Auto join #testbot
INFO:pleaseopme:Grant privilege to channel=#testbot nickname=BOT hostmask@host level=4
-Wait 60 seconds & part -
-Join channel - not opped by the bot-
-tell the bot to op me works-
INFO:pleaseopme:Op #testbot user
INFO:pleaseopme:Grant privilege to channel=#BOT nickname=user hostmask@host level=4
-Join & part.. not opped by the bot-

Here's my config:

[pleaseopme]
db_path = /home/willie/.willie/pleaseopme.db
admin_password = password
whitelist =
logging = True
reply_help = True
auto_join = True
auto_part = False
max_channels = False

Not getting OPs

Just installed, have 3 bots running. None of the bots are opping anyone or each other even after waiting quite some time.

I enabled debugging and will report back if I notice anything.

Auto part when bot is not operator

The bot should automatically part the channel if it has not been given operator mode for a long time. If an opless bot remains opless, then it is not being used. This will help keep the channel list down if a whitelist is not used.

error on willie load

Error in pleaseopme setup procedure: super() takes at least 1 argument (0 given) (../../../../../../../.willie/modules/pleaseopme.py:155)

Migrate to Sopel

Willie has been renamed to Sopel and the API has changed a bit.

Suggestion: Add more options

I would love to see options like:

  • adjust duration for entry expiration (Is it possible to make entries never expire?)
  • allow voice to be given just by nickname (without checking for ident or hostmask, like
    IF level.voice THEN /mode +v nick!*@*)
    These nicks could also go into a simple text file when they never expire anyway.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.