Commit graph

16 commits

Author SHA1 Message Date
ChillerDragon 940cc4269f Fix ugly rubocop if and silent disconnect 2022-11-05 17:23:35 +01:00
ChillerDragon ddef46991b rubocop -a 2022-11-05 17:19:05 +01:00
ChillerDragon db106ba70e Add on_client_drop() 2022-11-05 11:59:36 +01:00
ChillerDragon 8fe595b0a6 Client info is actually used to display join msgs
Looked at the c++ client code and it actually does that.
The entergame message is only used in demos. Yeet on those.
2022-11-05 11:34:34 +01:00
ChillerDragon 771bdfe859 Holy sh*t this lib is actually usable 2022-11-05 11:07:16 +01:00
ChillerDragon 7689d2725a Strong control over lib using Context objects 2022-11-05 10:35:40 +01:00
ChillerDragon 1d3076e34b Break api hook_chat -> on_chat 2022-11-05 09:39:16 +01:00
ChillerDragon 0f9c9a0804 Proper chat message support 2022-11-04 16:26:24 +01:00
ChillerDragon 875132a03a Document more samples 2022-11-04 13:22:29 +01:00
ChillerDragon 794915942c Close connection on ctrl+c 2022-11-04 13:07:34 +01:00
ChillerDragon effa00b001 Disconnect before connecting 2022-11-04 13:04:51 +01:00
ChillerDragon 0e42839e74 Fix reconnecting 2022-11-04 12:55:01 +01:00
ChillerDragon 2919feb529 Unhardcode more chunk headers 2022-11-04 10:12:23 +01:00
ChillerDragon 24fa105f66 Do not spawn a thread by default
This allows users to implement better multi threading than me.
Or if someone just wants to fire and forget a client that should just
use the provided hooks then not detaching takes away the effort
of keeping the program running.

Imo it is an easier and more fun problem to have:

  "My client connects fine but my other ruby code does not run"

than

  "My program just quits when I run it"
2022-11-01 15:32:47 +01:00
ChillerDragon f7486c353f Spawn thread for connection 2022-11-01 15:27:39 +01:00
ChillerDragon 9fc83cb327 Allow hooking in custom chat code 2022-11-01 14:25:56 +01:00