bancho-irc 0.6.1

osu! IRC & multiplayer lobby management library using vibe.d


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

bancho-irc

osu! IRC client library basically only compatible with bancho due to \n line endings and very limited IRC commands.

Documentation

Example

auto users = ["WebFreak", "Node"];
OsuRoom room = banchoConnection.createRoom("bob");
runTask({
	foreach (user; users)
		room.invite(user);
});
runTask({
	room.password = "123456";
	room.size = 8;
	room.mods = [Mod.Hidden, Mod.DoubleTime];
	room.map = "1158325";
});
runTask({
	int joined;
	try
	{
		while (true)
		{
			string user = room.waitForJoin(30.seconds);
			joined++;
			room.sendMessage("yay welcome " ~ user ~ "!", HighPriority.yes);
		}
	}
	catch (InterruptException)
	{
		if (joined == 0)
		{
			// forever alone
			room.close();
			return;
		}
	}
	room.sendMessage("This is an automated test, this room will close in 10 seconds on timer");
	room.setTimer(10.seconds);
	try
	{
		room.waitForTimer(15.seconds);
	}
	catch (InterruptException)
	{
		room.sendMessage("Timer didn't trigger :(");
		room.sendMessage("closing the room in 5s");
		sleep(5.seconds);
	}
	room.close();
}).join();
Dependencies:
vibe-d:core, vibe-d:stream, eventsystem
Versions:
0.6.1 2018-Aug-24
0.6.0 2018-Aug-24
0.5.4 2018-Jun-08
0.5.3 2018-Jun-02
0.5.2 2018-Jun-02
Show all 14 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 12 downloads total

Score:
2.1
Short URL:
bancho-irc.dub.pm