Code Monkey home page Code Monkey logo

zncscripts's Introduction

zncscripts

Scripts and modules and modifications for ZNC https://znc.in

bansearch.py

Quickly determine why a user is unable to join/talk in a channel.

Note that this script was optimized for freenode with the modes and extbans available there. It might not work or require additional tweaking for other networks. Please also note that it is far from perfect and might fail in (constructed) edge cases, but for general consumption it should be fine.

This script takes a nick and channel as an argument, the nick has to be online. The channel is then, per default, checked for +b (bans), +q (quiets) and $x, $a and $j extbans Note that the $j behaviour is more accurate than other solutions, but not fully accurate, as the $j channel will be tested for all modes, not only +b. If someone feels bored enough to fix that: pull requests welcome. Modes (currently supported: +b, +q, +e) can be specified as an optional third argument.

It will also check for the special cases of +q $~a (quiet unidentified users) and +r (registered users only channel mode)

The script can be loaded if your znc has python module support with the usual loadmod command, i.e. /msg *status loadmod bansearch if placed in a znc mod directory.

Example usage:

/msg *bansearch check Fuchs #freenode check if there are any bans or $a,$x,$j extbans or quiets matching the user Fuchs in #freenode

/msg *bansearch check Fuchs #freenode be check if there are any bans or $a,$x,$j extbans or exempts (+e) matching the user Fuchs in #freenode

/msg *bansearch check Fuchs #freenode q check if there are any quiets matching the user Fuchs in #freenode

Example output:

/whois Testvieh
‎[Whois]‎ Testvieh is 01020304@gateway/web/cgi-irc/kiwiirc.com/ip.1.2.3.4 ([https://kiwiirc.com] Development release)
‎[Whois]‎ Testvieh is online via barjavel.freenode.net (Paris, FR, EU).
‎[Whois]‎ Testvieh is using a secure connection.
[Whois] Testvieh is logged in as Fuchs.
‎‎[Whois]‎ End of WHOIS list.


/msg *bansearch check Testvieh ##programming
‎<‎*bansearch‎>‎ Checking for bans on testvieh in ##programming-bans2 as well due to $j
<‎*bansearch‎>‎ Checking for bans on testvieh in ##bans as well due to $j
‎<‎*bansearch‎>‎ Checking for bans on testvieh in ##programming-bans as well due to $j
‎<‎*bansearch‎>‎ 01020304@gateway/web/cgi-irc/kiwiirc.com/ip.1.2.3.4  (account: Fuchs, GECOS: //kiwiirc.com] development release) banned in ##programming with ban *!*@gateway/web/cgi-irc/*.
‎<‎*bansearch‎>‎ Ban check complete.

zncscripts's People

Contributors

fuchs avatar glguy avatar

Watchers

James Cloos avatar  avatar

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.