From 24197ba7c6709498e930b6e25ec4d7d30a4e33e9 Mon Sep 17 00:00:00 2001 From: Joe Rayhawk Date: Thu, 11 Jan 2024 17:37:20 -0800 Subject: crystal/tcpsocket.cr: Get irc message transport working --- crystal/lib/bungmobott/src/bungmobott.cr | 39 ++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) (limited to 'crystal/lib/bungmobott') diff --git a/crystal/lib/bungmobott/src/bungmobott.cr b/crystal/lib/bungmobott/src/bungmobott.cr index d54eaad..8c7f755 100644 --- a/crystal/lib/bungmobott/src/bungmobott.cr +++ b/crystal/lib/bungmobott/src/bungmobott.cr @@ -24,7 +24,25 @@ module BungmoBott property twitch : String? property gamesurge : String? end - + +# Do we turn this into a class? Maybe an Enum? +# class Permissions +# include YAML::Serializable +# include YAML::Serializable::Unmapped +# property any +# property sub +# property mod +# property vip +# end + + class Commands + include YAML::Serializable + include YAML::Serializable::Unmapped + property perm : Array( String )? = nil + property func : String + property arg : Array( String? )? = nil + end + class JoinChannels include YAML::Serializable include YAML::Serializable::Unmapped @@ -50,10 +68,23 @@ module BungmoBott ) # FIXME: do sockets and such even work on Windows? # Should probably warn about that somewhere around here. #@[YAML::Field(emit_null: true)] - property listen : String? = nil + property bungmobott_listen : String? = nil + property bungmobott_connect : String? = nil + #@[YAML::Field(emit_null: true)] + property obs_connect : String? = nil property chat_user : ChatUser? = ChatUser.from_yaml("---") property join_channels : JoinChannels? = JoinChannels.from_yaml("---") + property commands : Hash( String, Array( Commands ) )? = nil + @[YAML::Field(emit_null: true)] property twitch_user_id : UInt32? = nil + @[YAML::Field(emit_null: true)] + property voice_list : String? = nil + +# def after_initialize() +# if @voice_list? +# # @voice_list = @statedir + "/voices.txt" +# end +# end end class Secrets include YAML::Serializable @@ -66,6 +97,10 @@ module BungmoBott property gcloud_token : String? @[YAML::Field(emit_null: true)] property gamesurge_password : String? + @[YAML::Field(emit_null: true)] + property obs_password : String? + @[YAML::Field(emit_null: true)] + property bungmobott_key : String? end end -- cgit v1.2.3