Giter Club home page Giter Club logo

chanserv.py's Introduction

Simple chanserv helper script for Xchat
(c) 2006-2013 Dennis Kaarsemaker

Latest version can be found on http://github.com/seveas/chanserv.py

This script is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 3, as published by the Free Software Foundation.

Usage instructions:
- Place in ~/.xchat2 for it to be autoloaded
- Use /py load chanserv.py if you already started X-chat
- Connect to freenode, if not connected (other networks will not work)

It adds one command to xchat: /cs
/cs understands the following arguments

To give/take ops/voice:

o  or op      - Let chanserv op you/others (/cs op, /cs op nick)
v  or voice   - Let chanserv give you/others voice
d  or deop    - Let chanserv deop you/others (/cs deop, /cs deop nick)
dv or devoice - Let chanserv decoice you/others (/cs devoice, /cs devoice nick)

To op yourself, perform an action, and deop:

k  or kick    - Kick a user, possibly with comment (/cs kick nick [comment])
b  or ban     - Ban a user (/cs ban [-nihar] nick)
kb or kickban - Kick and ban a user (/cs ban [-nihar] nick)
f  or forward - Ban a user with a forward (/cs forward [-nihar] nick chan)
kf or kickforward - Kickban a user with a forward (/cs forward [-nihar] nick chan)
m  or mute    - Mute a user (/cs mute [-nihar] nick)
l  or lart    - A combination of kick and ban on all fields
u  or unban   - Remove all bans for a user (/cs u nick)
t  or topic   - Set channel topic (/cs t New topic here)
m  or mode    - Change channel mode (/cs mode modes here)
i  or invite  - Invite yourself or someone else (/cs invite [nick])
bans          - Show bans that apply to someone without removing them (/cs bans nick)

* Bans, forwards and mute take an extra optional argument that specifies
  what should be banned: nickname, ident, host, account and/or realname.
  /cs ban -nah nick -- Ban nick, account and host
  /cs forward -nihra nick #somewhere -- Forward all

* These commands also take an extra argument to specify when bans/mutes
  should be lifted automatically.
  /cs ban -t600 nick -- Ban nick for 10 minutes
  /cs ban -nah -t3600 -- Ban nick, account and hostname for an hour

* Unban will remove all bans matching the nick or mask you give as argument
  (*  and ? wildcards work)
* It won't actually kick, but use the /remove command

The following additional features are implemented
- Autorejoin for /remove
- Auto-unmute when muted
- Auto-unban via chanserv
- Auto-invite via chanserv
- Auto-getkey via chanserv

Please note that as of march 2013, I am no longer using Xchat. This script is
stable and hasn't seen much changes over the last few years though. Bug reports
and reasonable feature requests will still be accepted and acted upon, but I
will not come up with new features, or find bugs myself.

chanserv.py's People

Contributors

aperson avatar seveas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

chanserv.py's Issues

Script fails to unban IPV6 addresses

/cs forward -t600 *!*@2600:3c01::f03c:91ff:fe93:9b46 ##fix_your_connection
--- mode #minecraft #minecraft +o aperson by ChanServ
--- mode #minecraft #minecraft +b *!*@2600:3c01::f03c:91ff:fe93:9b46$##fix_your_connection by aperson
--- mode #minecraft #minecraft -o aperson by ChanServ

ten minutes later...

 --- mode #minecraft #minecraft +o aperson by ChanServ
 --- mode #minecraft #minecraft -b *!*@* by aperson
 --- mode #minecraft #minecraft -o aperson by ChanServ

Useless op'ing for timed unbans

I think I may have found a bug in chanserv.py. When you /cs mute -t300 nick IF the +q is removed manually, cs will op and stay +o. it should +o see the ban/mute is no longer there and -o.
manually removed before the -t time has expired that is

/cs reports Invalid target on nicks that start with \

when trying to kick/ban a user with a nick that starts with a \ chanserv reports an Invalid target.

  • \u\m\a\d\ (~blitz@trivialand/elite/blitz) has joined ##blitzykick
    <\u\m\a\d> WAT WAT
    just a sec
    <\u\m\a\d> okay

    /cs k \u\m\a\d\ test

  • Invalid target: \u\m\a\d\

script will ban $a:None with lart on unregistered user

I banned a user via /cs lart earlier today and noticed that it banned $a:None. This user was not registered (presumably why it banned None). Maybe it'd be best to have the script ignore that ban when the user isn't registered? (I bet whoever registered None would appreciate that).

AttributeError when trying to set a timed forward

Full log, as seen from hexchat:

--- mode #minecraft #minecraft +o aperson by ChanServ
 Traceback (most recent call last):
   File "/home/zach/.config/hexchat/addons/chanserv.py", line 460, in do_mode
     run_pending(just_opped = ctx.get_info('channel'))
   File "/home/zach/.config/hexchat/addons/chanserv.py", line 442, in run_pending
     p.run()
   File "/home/zach/.config/hexchat/addons/chanserv.py", line 376, in run
     self.done()
   File "/home/zach/.config/hexchat/addons/chanserv.py", line 406, in done
     action.target_name_bannable = self.target_name_bannable
 AttributeError: 'Action' object has no attribute 'target_name_bannable'
--- mode #minecraft #minecraft +b *!*@cesar1.dawanda.com$##fix_your_connection by aperson
--- mode #minecraft #minecraft -o aperson by ChanServ

I ran:
/cs forward -t1200 *!*@cesar1.dawanda.com ##fix_your_connection

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.