seveas / chanserv.py Goto Github PK
View Code? Open in Web Editor NEWChanserv helper for freenode
Chanserv helper for freenode
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.
This script is targeted at freenode users, and freenode has akick which can do timed bans. This would be more ideal as the client does not need to be open to remove a ban.
/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
Tried to remove a user with /cs kb agu10^ Message and got reply:
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
when trying to kick/ban a user with a nick that starts with a \ chanserv reports an Invalid target.
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).
Currently, with py3k support enabled, cs.py is broken. When trying to us a command, you'll get a notice of -ChanServ- Invalid command. Use /msg ChanServ help for a command listing.
. I suspect it's a unicode issue.
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
Muting a user works fine, but trying to set a timed mute no longer works.
need to be able to ban multiple users at once
ex: /cs kb user,user1,user2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.