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

61 Commits

Author SHA1 Message Date
James Lu
72c48502c6 Generate __init__.py with package version on runtime
Closes #259. This removes world.version and replaces it with pylinkirc.__version__ where the former was used.
2016-07-03 00:26:03 -07:00
James Lu
91a663d5c7 commands, relay: use irc.reply() with private=True instead of irc.msg()
This is more flexible, etc.
2016-06-30 18:43:56 -07:00
James Lu
481d70eff8 New import paths for properly installed pylinkirc 2016-06-20 18:18:54 -07:00
James Lu
8c55eb43e7 relay/commands: reformat showuser output slightly 2016-05-21 23:05:39 -07:00
James Lu
32bc5f120b core: migrate the main client to ServiceBot (#216)
- irc.spawnMain is dropped. Clients are now spawned in the endburst loop, after protocol negotiation completes. This allows PyLink to spawn clients with hideoper, etc., closing #194.
- utils.add_cmd and irc.callCommand are now just wrappers around world.services['pylink'].add_cmd and call_cmd respectively.
- coreplugin registers the main client while it is loaded up, before any commands are added.
2016-05-14 13:29:23 -07:00
James Lu
3bb1208e74 core: move toLower to Irc (#199) 2016-04-30 16:57:38 -07:00
James Lu
2fe2e9c8c4 core: move isOper, checkAuthenticated to Irc (#199) 2016-04-30 16:54:11 -07:00
James Lu
064cb9b6aa core: move reverseModes, joinModes into Irc 2016-04-30 16:33:46 -07:00
James Lu
a069ce8cb4 Unbrick loglevel changing (Closes #208) 2016-04-23 11:06:08 -07:00
James Lu
8f32727a3f Move rehash into core (Closes #178) 2016-04-09 09:54:04 -07:00
James Lu
8135f3a735 core: Depluralize prefixmodes mappings (#168)
This is an API breaking change. I really don't know why I made these keys plural to start, since it only made things more complicated. Prefix modes are not pluralized in the list of supported modes of each IRCd.
2016-03-19 17:25:04 -07:00
James Lu
a8303d0110 commands: sort channel list in 'showuser' output 2016-03-14 14:35:09 -07:00
James Lu
df23b79780 commands: reformat 'showuser' output, and show services login info (#25) 2016-02-20 18:24:29 -08:00
James Lu
0d4655c381 core: support multiple channel loggers with DIFFERENT log levels & fix example conf (#83) 2016-01-30 23:35:51 -08:00
James Lu
cf1de08457 commands: support rehashing channel loggers 2016-01-23 13:52:37 -08:00
James Lu
2503bd3ee5 commands: In rehash, use irc.disconnect() to disconnect networks removed from conf 2016-01-23 13:52:37 -08:00
James Lu
eac934c237 classes: sort code, move nickToUid, clientToServer, isInternalClient, isInternalServer into the Irc class
The following BREAKING changes are made:
utils.nickToUid(irc, nick) -> irc.nickToUid(nick)
utils.isInternalClient(irc, uid) -> irc.isInternalClient(uid)
utils.isInternalServer(irc, uid) -> irc.isInternalServer(uid)
utils.clientToServer(irc, uid) -> utils.getServer(uid)
2015-12-31 17:28:47 -08:00
James Lu
9a81a2ba1f Rename utils.getProtoModule => utils.getProtocolModule 2015-12-24 17:33:49 -08:00
James Lu
7705d48425 commands: update irc.botdata in REHASH too 2015-11-26 22:57:52 -08:00
James Lu
5027feb553 Don't crash when REHASH loads a config file that's invalid
This was actually several bugs in one:
- The sys.exit() call in loadConf should be... toggleable
- loadConf printed errors but forgot to re-raise the actual exception it caught
- The error reply in the REHASH command was passing the wrong arguments to irc.reply(), which would cause an error within an error when it ran
2015-11-11 18:55:51 -08:00
James Lu
9a1eab3b82 commands: add command to set log level (Closes #124) 2015-10-25 10:18:51 -07:00
James Lu
17a2dcd21f plugins: use irc.reply(...) instead of irc.msg(irc.called_by, ...) whereever possible 2015-10-23 18:29:10 -07:00
James Lu
d14cf3c7cf Move (un|re)?load, identify commands to coreplugin
This is so the commands plugin, which includes other generic (but not essential) commands, can be more easily reloaded.
2015-10-23 18:22:29 -07:00
James Lu
1b8f1ff95e commands: s/public channel/channel/ 2015-10-18 12:49:13 -07:00
James Lu
6034333682 commands: actually break when identify is sent in a channel 2015-10-18 10:27:27 -07:00
James Lu
7e57798f4d core: refresh various serverdata attributes on REHASH 2015-10-02 23:17:55 -07:00
James Lu
54414f307e commands: new REHASH command (Closes #89)
This command reloads the config and automatically add/removes networks that are in the new conf but not currently connected.
2015-09-28 19:13:08 -07:00
James Lu
e84a2d1025 Modularize our import hacks, make Irc() take a conf object again 2015-09-28 19:12:45 -07:00
James Lu
5aeaac0394 commands: only allow loading plugins that aren't already loaded 2015-09-27 12:12:58 -07:00
James Lu
07fe7202aa commands: add plugin loading/unloading/reloading support
Closes #5.
2015-09-27 11:54:06 -07:00
James Lu
bbedd38703 world: rename command_hooks=>hooks, bot_commands=>commands 2015-09-27 10:53:25 -07:00
James Lu
7470efc461 commands: add an echo command 2015-09-26 10:20:23 -07:00
James Lu
8e444c5dbe plugins: support FANTASY (where reasonable) by using irc.msg(irc.called_by, ...) instead of irc.msg(source, ...) 2015-09-26 10:20:23 -07:00
James Lu
0f26848b16 Add a useful "version" command 2015-09-19 11:51:56 -07:00
James Lu
b531a180dc commands: add a "showchan" command 2015-09-14 18:43:19 -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
2777b88d33 commands: Add a shutdown command (#82)
Sometimes exiting takes a little time, possibly from waiting for sockets to close?
2015-09-02 23:46:59 -07:00
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