3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 09:19:23 +01:00
Commit Graph

28 Commits

Author SHA1 Message Date
James Lu
822544e3cc core: keep track of where last command was called & make command calling a shared function
Prerequisite for FANTASY command implementation (#111).
2015-09-26 10:20:23 -07:00
James Lu
16d8a2212a coreplugin: protect the main PyLink client too, even though it's technically manipulatable 2015-09-20 16:55:04 -07:00
James Lu
f110ac15b0 coreplugin: Protect against forced deopers
Closes #67.
2015-09-20 13:21:04 -07:00
James Lu
4c45533ecb coreplugin: send the RIGHT server desc in WHOIS replies 2015-09-20 12:11:28 -07:00
James Lu
f38958995c Store opertypes with spaces instead of underscores, and only change them back when sending OPERTYPE
Another "Janus sucks" commit - it should be always using underscores when sending OPERTYPE, but it doesn't...
2015-09-20 11:25:45 -07:00
James Lu
c77f92357a coreplugin: show real IP/host in WHOIS 2015-09-19 10:25:50 -07:00
James Lu
394d4f7f1d coreplugin: reply with the *right* server name in WHOIS 2015-09-06 22:40:22 -07:00
James Lu
62e7cc4fca move utils.msg() => classes.Irc.msg()
New function gets an extra (optional) "source" argument for specifying a sender UID. It's also shorter since no IRC object has to be passed to utils.
2015-09-06 22:23:44 -07:00
James Lu
57da0aa3b3 Classify all our protocol modules - why didn't I do this earlier 2015-09-05 18:00:57 -07:00
James Lu
2c4a88b9be coreplugin: catch NotAuthenticatedError in a prettier way 2015-09-02 23:37:54 -07:00
James Lu
26e102f01a Show oper types on WHOIS 2015-08-31 14:52:56 -07:00
James Lu
e1e31f64ad Allow multiple plugins to bind to one command name!
They will get called in a list, one after the other. The "help" command is able to distinguish with this too.
2015-08-29 19:25:07 -07:00
James Lu
973aba6de7 Move utils' global variables to world.py 2015-08-29 09:39:33 -07:00
James Lu
bc7765b241 Let's use consistent "Unknown command" errors, right? 2015-08-25 20:51:13 -07:00
James Lu
7e449aaada coreplugin: Don't stop iterating if one WHOIS handler errors 2015-08-24 18:40:31 -07:00
James Lu
0d497a8f72 coreplugin: show channel prefixes in WHOIS reply 2015-08-24 18:37:46 -07:00
James Lu
af02af6b4a coreplugin: send WHOIS lines in a more standard order 2015-08-24 18:27:18 -07:00
James Lu
694e7b87f6 various: make the server description configurable
Two options for this: bot::serverdesc, and server::<network>::serverdesc, with the latter taking precedence if present.
2015-08-24 18:14:35 -07:00
James Lu
3fc5896f82 Strip leading/trailing spaces when handling PM commands 2015-08-18 05:49:27 -07:00
James Lu
821f546f12 Make sure the PyLink client rejoins all relay channels on KILL
This adds a new internal hook, 'PYLINK_SPAWNMAIN', which is triggered whenever Irc().spawnMain() is called.
2015-08-18 05:44:36 -07:00
James Lu
3b67ddfee6 coreplugin: use a more standard "End of WHOIS" message
"End of /WHOIS list" seems relatively standard: it's used by InspIRCd, charybdis, and UnrealIRCd.
2015-07-24 11:13:53 -07:00
James Lu
44e07b0c2f relay: don't error if the WHOIS target isn't a relay user... oops 2015-07-23 00:10:54 -07:00
James Lu
88c85c8475 coreplugin/whois: only show user modes to opers 2015-07-23 00:05:05 -07:00
James Lu
a7f977aa3b Add whois handlers for channel lists, user modes, and signon time, and relay user information
New API: utils.whois_handlers allows one to add functions taking (irc, target) and returning (irc numeric, reply text)

Closes #72.
2015-07-23 00:01:51 -07:00
James Lu
d52fba37b8 add numericServer for sending raw numerics from servers, and WHOIS handling in coreplugin
Basic WHOIS handling (user information, server information, IRCop access) are sent. #72

TODO: send channel lists, an extra note for relay clients, user modes, and idle time
2015-07-22 21:15:34 -07:00
James Lu
57e9bf601e Log command usage, 'exec' usage, successful logins, and access denied to commands in admin.py
Closes #66.
2015-07-19 15:01:49 -07:00
James Lu
536366de99 main/coreplugin: use log.exception() instead of traceback.print_exc()
This fixes tracebacks only being sent to console, and not the log file.
2015-07-18 20:12:13 -07:00
James Lu
0aa2f98705 Move client spawning, command / KILL / KICK handling outside the protocol module
New plugin 'coreplugin' takes care of command/KILL/KICK handling, while client spawning is moved into Irc.spawnMain() and is used by the former.

Closes #33.
2015-07-16 21:52:44 -07:00