3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-24 11:39:25 +01:00
Commit Graph

24 Commits

Author SHA1 Message Date
James Lu
5503477646 commands: distinguish commands with multiple binds in 'list' 2015-08-29 19:29:49 -07:00
James Lu
8976322273 Replace admin.showuser with prettier whois-style cmds in 'commands' and 'relay' 2015-08-29 19:29:05 -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
2fe9b624e7 Consistently capitalize errors and other messages 2015-08-25 20:55:39 -07:00
James Lu
bc7765b241 Let's use consistent "Unknown command" errors, right? 2015-08-25 20:51:13 -07:00
James Lu
880b59c2c1 utils.isOper: check for both umode +o and login status
Also, make commands.status show this isOper result.
2015-08-02 19:41:40 -07:00
James Lu
254ccea0a3 remove some debugging cruft and unused imports 2015-07-23 11:46:45 -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
50665ec601 commands: remove 'debug', it's useless now that 'exec', 'showchan', and 'showuser' exist 2015-07-17 22:21:57 -07:00
James Lu
6508cb3c38 commands: add a 'help' command (closes #8)
Fetch the docstring of the command function if it exists, and format appropriately.
2015-07-17 22:21:16 -07:00
James Lu
e7922be9fb plugins/commands.py: warn on failed login attempts 2015-07-08 23:21:01 -07:00
James Lu
211decd2aa everything: Improve logging 2015-07-05 13:44:48 -07:00
James Lu
f06bcc7928 Merge commit 'bd755e137ffa034007a77d75fbd00d21e759163e' into wip/logger-module
Conflicts:
	proto.py
2015-07-05 13:22:17 -07:00
James Lu
f40cb7954a Allow dynamic protocol loading again, and make proto an attribute of Irc()
This should remove the need for plugins, etc. to import proto directly,
which wouldn't work because of dynamic naming.
2015-06-16 20:05:41 -07:00
James Lu
4d763288e5 rename utils._nicktoUid to utils.nickToUid
Consistency in function capitalization is a good thing!!
2015-06-07 19:36:21 -07:00
James Lu
86c7fd0db1 WIP admin commands 2015-06-07 13:40:18 -07:00
James Lu
6680942424 More code and broken shenanigans
- plugins/commands.py: add admin-only eval command
- add IrcChannel class and basic channel (FJOIN/QUIT) handling
- Move SQUIT/QUIT handling code to a shared removeClient function
    - Unfortunately, this causes a regression where the users and channels indexes aren't purged on a netsplit :(
2015-06-06 23:06:33 -07:00
James Lu
d9db7e1b9e It's almost June! Updates:
- Move config handling into separate module
- Implement identify and status commands, currently only supporting the admin account defined in the config. Closes #1.
- Move proto.add_cmd to utils.py, rename _msg() to msg()
- Allow sending the command name as an optional argument in add_cmd
- Add catch-all exception handling in plugins to prevent them from crashing the program!
2015-05-31 12:20:09 -07:00
James Lu
0fcf5ead04 utils.py: Make _msg a shared function (Closes #3) 2015-05-30 23:00:39 -07:00
James Lu
17fc05cc9a WIP: use a proper logging module 2015-05-30 22:35:00 -07:00
James Lu
d158143cea This month's code dump... featuring:
- Server enumeration, with handlers for BURST (introduction to uplink), SERVER (introduction of uplink's other leaf servers), NICK, and SQUIT (closes #2)
- Store UIDs instead of nicks in the user database - this makes the protocol a lot easier to work with.
2015-05-30 22:15:19 -07:00
James Lu
f2fdaf55a1 commands: add a command to print debug info to console 2015-04-24 23:04:33 -07:00
James Lu
6b79793336 cleanup, add commands.py plugin (incomplete) 2015-04-24 23:00:01 -07:00