Commit graph

41 commits

Author SHA1 Message Date
a-bad-dev
9deb02a7a5
fix type 2026-03-29 22:52:46 -03:00
a-bad-dev
68a5617869 mention the official IRC channel 2026-03-29 18:19:40 -03:00
a-bad-dev
a38d990468
fix missing comma 2026-03-27 15:28:26 -03:00
a-bad-dev
1e2c4f2b68
fix newlines 2026-03-27 00:57:56 -03:00
a-bad-dev
eff719bbe6
improve documentation 2026-03-27 00:56:39 -03:00
a-bad-dev
c175fb05ff
Merge pull request #4 from jcjordyn130/main
Fix command prefix parsing code in _handle_message
2026-03-15 22:16:42 -03:00
Jordyn
ab19e0db91 Fix command prefix parsing code in _handle_message 2026-03-15 20:13:40 -05:00
a-bad-dev
bfe043d33d
Merge pull request #3 from jcjordyn130/main
Tons of refactoring for stability and usefulness
2026-03-15 21:34:21 -03:00
Jordyn
aa90c78224 Increase stability of message parser and add SSL support
ZNC loves to send weird messages such as empty PRIVMSG, so I hardened the prefix parsing code accordingly.

Additionally, support was added for server forced nickname changes.
2026-03-15 17:56:58 -05:00
Jordyn
ac6560e680 Add command to kill all children processes spawned by cmdthread
Additionally, a maximum send queue length was added to avoid something like `cat /dev/urandom` from being a massive memory hog and causing OOM.

Because output is read from the process and added to the message queue in real time, this could lead to infinite memory usage without it.
2026-03-14 22:07:46 -05:00
Jordyn
1a5e4e062c Added command output for clearsendq 2026-03-14 21:46:08 -05:00
Jordyn
df915da6d4 Added command for clearning the send queue and cleaned up code
Mainly I moved the command specific code from the giant message handling if statement into separate functions which are called dynamically depending on name.

I moved some functions around to have a basic structure as commented in Server().
2026-03-14 21:41:34 -05:00
Jordyn
9385149bc2 Add systemd service 2026-03-14 19:21:56 -05:00
Jordyn
e682656fe5 Fix die bot command to actually terminate the program
Specifically, this corrects interrupting the main thread as it was waiting on input() if it is a tty.

Server.die() was changed to bypass the sendq for final IRC messages for a quick termination and to interrupt the main thread with os.kill and SIGINT.

This way the code exits gracefully and properly tears the connection down.
2026-03-14 18:55:53 -05:00
Jordyn
608b8e3cad Fix INVITE code again
This adds it to the channel list so it gets PART'ed correctly
2026-03-14 18:19:17 -05:00
Jordyn
ca21c914ef Avoid 100% CPU loop during heavy usage 2026-03-14 04:45:57 -05:00
Jordyn
2fbc2cf051 Fix BrokenPipeError Handling 2026-03-14 04:41:16 -05:00
Jordyn
0febb315c3 Allow for running this bot without a valid stdin
Specifically, if rawcmd's input fails, it will just wait for the going down signal.
2026-03-14 04:32:11 -05:00
Jordyn
a5134ade39 Add privmsg command for less verbose messaging
_msg_q was also refactored to _send_q to better represent what it is
2026-03-14 04:23:53 -05:00
Jordyn
72464611a8 Fix INVITE command 2026-03-14 03:52:33 -05:00
Jordyn
c1d9da8ef8 Improve ping support to avoid ping timeouts
Specifically the ping is moved to the message throttling code so that every 10th
message triggers a ping.

This also allows for me to remove the multiple ping handlers.
2026-03-14 03:47:00 -05:00
Jordyn
4fab129a1e Add configuration file support 2026-03-14 03:42:04 -05:00
Jordyn
012ba9fc2f Move PRIVMSG parsing code to _parse_message 2026-03-14 00:57:09 -05:00
a-bad-dev
66ba59e5d6
Merge pull request #2 from jcjordyn130/main
Add placeholders for Server() and allow for a list of bot oppers
2026-03-14 02:32:43 -03:00
a-bad-dev
d189fdd5b1
Merge branch 'main' into main 2026-03-14 02:28:57 -03:00
a-bad-dev
ed44eb7c3c
remove default values 2026-03-14 02:25:11 -03:00
Jordyn
fdb305e822 Generalize some info and allow for a list of bot oppers 2026-03-14 00:22:15 -05:00
a-bad-dev
61975fa9af
remove TODO 2026-03-14 02:19:53 -03:00
a-bad-dev
1cdd250cc2
update README to accompany the code 2026-03-14 02:16:28 -03:00
a-bad-dev
1bb79d2679
Merge pull request #1 from jcjordyn130/main
Rewrite main.py to be multithreaded and more stable
2026-03-14 02:14:40 -03:00
Jordyn
fe6727c3c1 Rewrite main.py to be multithreaded and more stable 2026-03-14 00:11:15 -05:00
a-bad-dev
ba91837fd5
remove "better IRC response parser" 2026-03-12 15:13:17 -03:00
a-bad-dev
cd7da8ae82 Use .join() in a few places 2026-02-28 09:00:21 -04:00
a-bad-dev
74b3b0d0c4 Make commands multithreaded 2026-02-23 11:57:51 -04:00
a-bad-dev
216afac3f2 Fix invalid UTF-8 bytes in output crashing the script 2026-02-20 23:28:56 -04:00
a-bad-dev
c2f78d79d8
split the message *after* printing it 2026-02-20 22:46:08 -04:00
a-bad-dev
586cf1ad90 Rewrite most of the script (especially the message parser) 2026-02-19 23:29:04 -04:00
a-bad-dev
fea04ee12b
add todo 2026-02-17 19:08:53 -04:00
a-bad-dev
a8b2fe5014
add a warning 2026-02-17 19:04:23 -04:00
a-bad-dev
f87b1f9d71
Add main.py 2026-02-17 19:02:29 -04:00
a-bad-dev
8e42e34e52
Initial commit 2026-02-17 18:58:52 -04:00