Commit Graph

85 Commits

Author SHA1 Message Date
skizzerz
9190a4c859 Rework TLS validation a bit and support SASL EXTERNAL
- Move the config comments to botconfig.py.example where they will be more useful,
  and move the bits in settings.py near the other IRC-related settings.
- Removed support for hash types that aren't SHA-256 as we perform all the hashing on
  our end (doesn't matter what the server does or does not support), and this greatly
  simplifies the code while leaving things secure enough.
- Hardcode a default cipher suite according to mozilla modern standards, as the
  builtin ciphersuite in python may be less secure for older python versions.
- Add support for EXTERNAL auth in SASL, if a client certificate is provided. If this
  fails, it will fall back to PLAIN auth (to account for the case where a cert is added
  to the bot, but has not yet been added to NickServ, so that the bot can connect and add
  it to NickServ via !fsend)
- Redact passwords from console/log output so that asking people to pastebin their
  --verbose output when reporting issues in #lykos is less fraught with peril.
2018-01-10 12:09:10 -07:00
Samuel Hoffman
532386a2b9 Support for TLS certificate verification and client certificates. (#301)
If a TLS certificate fingerprint is provided, the client will check it against the SHA256 hex digest of the server's certificate. Different hash algorithms can be specified, and multiple fingerprints can be specified for networks with more than one server.
2018-01-10 07:58:19 -07:00
skizzerz
33b2e26c15 Support SERVER_PASS without placeholders
Sometimes a connection password which is different than nickserv
password is required. This supports that now.
2017-11-02 18:01:44 -05:00
nyuszika7h
bde640c9ae Don't attempt to identify with no password set
Some servers disconnect the client if PASS fails, so the bot will fail
to connect unless SERVER_PASS is also explicitly set to None.
2017-01-16 12:40:14 +01:00
Vgr E. Barry
885889495a Properly handle the bot's nick being already in use 2016-11-16 16:18:37 -05:00
Vgr E. Barry
e1d3e1150b Make IRCClient into a context manager
For now just a placeholder, will properly do it later.
2016-11-02 16:14:23 -04:00
Vgr E. Barry
6460eb6804 Define methods in IRCClient instead of using a decorator
Mypy doesn't like it.
2016-08-13 12:33:20 -04:00
jacob1
30699c69a8 fix sys.exit call preventing pull request #208 from being merged, closes #208 2016-01-02 01:36:55 -05:00
Lukas Martini
e7cdf1eb50 Support IPv6 connections 2016-01-02 01:28:50 -05:00
Ryan Schmidt
609cb6e2a7 Revert "Support IPv6 connections" 2015-12-04 17:48:26 -07:00
Lukas Martini
5fdc1eff65 Support IPv6 connections 2015-12-04 11:46:43 +01:00
nyuszika7h
c6a5cea715 Log connection, end of MOTD and joining channels in normal mode 2015-11-27 17:37:04 +01:00
skizzerz
a816b4b4ee Add SERVER_PASS config to control PASS command 2015-11-08 11:05:56 -06:00
jacob1
e30c8e3e19 this seems to fix the problem where the IRC lib ate errors 2015-10-12 19:22:25 -04:00
Vgr E. Barry
ae5f78decc Add a proper repr() for oyoyo.TokenBucket (useful for debugging) 2015-09-09 10:05:35 -04:00
skizzerz
dbb80a940e Fix issues related to undernet (and in general)
- Now possible to use the bot without it having a registered account by
  blanking NICKSERV_IDENTIFY_COMMAND
- Now possible to configure who ChanServ is as well as the command it
  uses to op up in channel (blank to prevent it from auto-opping).
  Example configuration provided for undernet
- Properly autojoin channels even if there isn't an MOTD
2015-07-28 22:35:47 -05:00
skizzerz
b4c5fc4188 Fix error introduced in 32ab792e 2015-07-27 22:36:43 -05:00
Vgr E.Barry
120a2f3717 Fix error (blame @nyuszika7h) 2015-07-27 09:26:40 -04:00
nyuszika7h
32ab792e2f Use the specified username for NickServ identify 2015-07-27 14:19:46 +02:00
nyuszika7h
21060b2bfb Add an option to change NickServ's name and the identify command 2015-07-27 13:08:52 +02:00
nyuszika7h
452c1b1ede Fix capability negotiation to be more sane (and IRCv3.2-compliant) 2015-06-15 20:20:28 +02:00
nyuszika7h
0d5839ac6a Remove redundant imports 2015-06-15 15:27:56 +02:00
nyuszika7h
dd2d82392d Reorganize imports 2015-06-15 15:20:27 +02:00
jacob1
a2d79a224c improve --verbose readability 2015-06-04 20:00:45 -04:00
nyuszika7h
440f4beca5 Remove some trailing whitespace 2015-03-28 15:44:38 +01:00
jacob1
2009f7763f don't log "unhandled commands" (all messages are still printed anyway) 2015-02-21 17:37:22 -05:00
Vgr E.Barry
26c81c2c03 Add timestamps in the client and module loader. 2015-01-18 09:22:03 -05:00
Vgr E.Barry
20eda8c5d1 Removed obsolete logging code. 2015-01-13 19:58:58 -05:00
Vgr E.Barry
55a14d6a3f Add a proper logging feature. Closes #72. 2015-01-13 19:58:55 -05:00
jacob1
dcae30a707 ident and realname config settings 2014-11-14 00:22:47 -05:00
Jimmy Cao
d4a3499680 add --verbose mode 2012-07-13 20:35:31 -05:00
Jimmy Cao
022d00847f ssl support 2012-06-29 14:25:37 -05:00
Jimmy Cao
e02402d77e sasl authentication, improved bot regain/release behavior, botconfig.py updated! 2012-06-29 13:59:59 -05:00
Jimmy Cao
52e4e8c578 various tweaks 2011-12-29 17:41:25 -06:00
Jimmy Cao
012cf83607 automatic devoice and -q when join 2011-12-29 02:45:54 -06:00
Jimmy Cao
4e1f76a8c0 added support for extended join 2011-12-21 18:20:25 -06:00
Jimmy Cao
92c3e17c75 emergency response to a change in freenode's settings 2011-09-09 22:51:00 -05:00
Jimmy Cao
922ec19b7f change line endings to unix style 2011-09-03 23:41:31 -05:00
Jimmy Cao
d87d362d23 bug fix 2011-08-18 15:25:25 -05:00
Jimmy Cao
6e9747ae39 call sys.exit() 2011-08-18 00:04:26 -05:00
Jimmy Cao
a978623004 os._exit takes one argument 2011-08-17 23:55:49 -05:00
Jimmy Cao
037d13cecb use os._exit 2011-08-17 23:52:04 -05:00
Jimmy Cao
abf194b92b make it easier for the bot to exit, allow rejoin after part within 7 seconds 2011-08-17 23:19:21 -05:00
Jimmy Cao
fc58c28f41 split messages that are too large, and also fix a bug where the bot doesn't completely exit on fbye 2011-08-15 23:07:21 -05:00
Jimmy Cao
aad7bfa538 hopefully make fbye/fdie more smooth 2011-08-11 14:40:13 -05:00
Jimmy Cao
a08bb9e60e fixed error that sometimes happen when fdie is used 2011-08-11 13:29:54 -05:00
Jimmy Cao
be7cb99219 fixed non-privmsg-nickserv authentication, added rate limiting for !stats, !votes, !admins, detectives now have a more complete PM message 2011-08-07 00:48:26 -05:00
Jimmy Cao
a98061e55e somewhat modified the anti-flood, and fixed some howl differences 2011-07-30 02:38:33 -05:00
Jimmy Cao
d31ddeb4ce trivial changes (nothing that affects the code) - moving lines around to organize it better 2011-07-29 22:29:41 -05:00
Jimmy Cao
1cc849537f now !help does not display aliases 2011-07-29 13:46:34 -05:00