2021-12-17 04:11:11 -05:00
|
|
|
|
using System;
|
2021-12-17 06:30:26 -05:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Net;
|
2021-12-17 04:11:11 -05:00
|
|
|
|
|
|
|
|
|
namespace franz.tests
|
|
|
|
|
{
|
|
|
|
|
class Program
|
|
|
|
|
{
|
|
|
|
|
static void Main(string[] args)
|
|
|
|
|
{
|
2021-12-17 06:30:26 -05:00
|
|
|
|
Console.WriteLine("Hello World, Im' " + Dns.GetHostName());
|
|
|
|
|
Telefranz.Configure("tester", "focalor:9092", new System.Collections.Generic.List<string>(){"a!"});
|
2021-12-17 04:11:11 -05:00
|
|
|
|
|
|
|
|
|
Telefranz.Instance.addHandler<silver_messages.global.report>(r => {
|
|
|
|
|
Console.WriteLine(r);
|
|
|
|
|
});
|
2021-12-17 06:30:26 -05:00
|
|
|
|
Telefranz.Instance.addHandler<silver_messages.directorial.execute_command>((ec) => {
|
|
|
|
|
if(ec.command == "a!"){
|
|
|
|
|
Console.WriteLine($"a! command executing! {string.Join("; ", ec.args)}");
|
|
|
|
|
}
|
|
|
|
|
});
|
2021-12-17 04:11:11 -05:00
|
|
|
|
Telefranz.Instance.ProduceMessage(new silver_messages.global.sound_off());
|
2021-12-17 06:30:26 -05:00
|
|
|
|
System.Threading.Thread.Sleep(15000);
|
|
|
|
|
Telefranz.Instance.ProduceMessage(new silver_messages.directorial.execute_command(){
|
|
|
|
|
command= "a!",
|
|
|
|
|
args= new List<string>(){"param 1", "param 2"}
|
|
|
|
|
});
|
|
|
|
|
System.Threading.Thread.Sleep(5000);
|
2021-12-17 04:11:11 -05:00
|
|
|
|
Console.WriteLine("k.");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|