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

891 Commits

Author SHA1 Message Date
James Lu
55a5d08378 Use a WORKING TS6 UID generator, adapted from InspIRCd source
Closes #21.
2015-06-19 10:43:42 -07:00
James Lu
93b1a11651 How on earth does this uid generator even work? It badly needs a rewrite... 2015-06-16 21:02:38 -07:00
James Lu
f7244ee6b7 Add basic nick and channel checking (ref #20) 2015-06-16 20:46:01 -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
43a46d3d99 Many fixes
- Move _nicktoUid to utils.py
- Make _sendFromUser arguments more consistent (irc, sendfrom, message) instead of (irc, message, sendfrom=None)
- Add admin only kickclient, partclient, and nickclient commands
- proto.joinClient: take UIDs instead of an IrcUser object, in order to be more consistent

Closes #4, Closes #12.
2015-06-07 19:31:56 -07:00
James Lu
8bbf4ba387 Merge branch 'wip/admin-commands' 2015-06-07 18:15:52 -07:00
James Lu
f99000f492 Add internal functions for psuedoclient kick, quit, and nick 2015-06-07 18:15:36 -07:00
James Lu
46095574be proto.py: add kill handler & autorejoin on kick/kill
Closes #19.
2015-06-07 18:08:49 -07:00
James Lu
38df372471 main.py: catch ImportError nicely 2015-06-07 17:04:23 -07:00
James Lu
86c7fd0db1 WIP admin commands 2015-06-07 13:40:18 -07:00
James Lu
36a93320d7 Oops, we need kick handling too! 2015-06-07 10:06:54 -07:00
James Lu
70480b8830 Make IrcChannel.users a set and add part handling
This should be everything needed for basic channel enumeration: closes #13.
2015-06-07 09:43:13 -07:00
James Lu
4b9e7b1937 Fix #17 (netsplit quits)
copy() all the things! Also purge empty channels on quit.
2015-06-07 09:33:35 -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
c33d5922c6 Turn spawn pseudoclient and JOIN into its own functions, and move IrcUser/IrcServer to its own module
These classes are protocol independent, so we may as well split them for future protocol modules.
2015-06-06 22:17:45 -07:00
James Lu
a0babeddcd Update README.md, with artwork from @Erenzie 2015-06-06 14:23:20 -07:00
James Lu
0ed1e13115 Remove plugins/hello.py
This was solely a testing module for the plugin/commands system, and serves no purpose anymore. commands.py provides basic commands that are both simple and actually useful.
2015-06-03 16:09:53 -07:00
James Lu
2e94e9a7d2 Allow multiple autojoin channels 2015-06-03 15:47:29 -07:00
James Lu
38bd58f7ff Actually check recvpass field (Closes #9) 2015-06-02 16:55:04 -07:00
James Lu
955ffbd012 Handle /whois replies for pseudoclient (IDLE server command) 2015-06-02 16:39:13 -07:00
James Lu
cac0f106aa config.yml.example: load commands.py by default 2015-06-02 13:37:35 -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
0e53a0fee4 Also count ourselves in server enumeration 2015-05-30 23:31:22 -07:00
James Lu
0fcf5ead04 utils.py: Make _msg a shared function (Closes #3) 2015-05-30 23:00:39 -07:00
James Lu
4ead81a66f remove unneeded imports 2015-05-30 22:35:31 -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
James Lu
53505084b5 README: okay, okay, it handles users now. But it's still a WIP! 2015-04-24 22:38:55 -07:00
James Lu
9b4fb50f25 Today's code dump, featuring:
- PLUGIN SUPPORT and COMMAND HANDLING, wow!!!!!!!
- Restructuring of files so that there's only one protocol module (anything else is too much to maintain for now)
- Split protocol things into utils.py
- Bugfixes: don't go into an endless loop of text spamming when the remote host closes the connection!
2015-04-24 22:37:07 -07:00
James Lu
80a2ce1d0a more things 2015-04-17 22:11:49 -07:00
James Lu
c074d58052 Change of plans, we're now just a regular pseudoservice
- Remove multinet support
- Update config.yml.example
2015-04-17 19:55:48 -07:00
James Lu
2c73424e86 readme update 2015-04-03 18:47:20 -07:00
James Lu
b1a989c971 add a make-next-uid function and rename pylink-main.py -> main.py
The "I really hate Python imports" update.
2015-04-03 18:45:18 -07:00
James Lu
7a62a655a3 never mind - use multiprocessing, add auto-reconnect, and some more handlers 2015-04-03 12:35:55 -07:00
James Lu
324551e185 rewrite in asyncio and other refactoring to support multinet - doesn't work yet! 2015-04-03 00:17:03 -07:00
James Lu
f3e736b6fb Add an inspircd protocol module - still a WIP 2015-03-19 16:21:49 -07:00
James Lu
64f937027a kill some cruft 2015-03-19 12:59:46 -07:00
James Lu
be3fe38206 Initial upload! 2015-03-19 12:55:18 -07:00