Prepares a bancho IRC connection with username & password (can be obtained from https://osu.ppy.sh/p/irc)
Clears all logs, called by connect
Clears all backlog & removes all event listeners for the object type.
Clears all backlog & removes all event listeners for the object type.
Connects to this.host:this.port (irc.ppy.sh:6667) and authenticates with username & password. Blocks and processes all messages sent by the TCP socket. Recommended to be called in runTask. Cleans up on exit properly and is safe to be called again once returned.
Creates a new managed room with a title and returns it. Automatically gets room ID & game ID.
Disconnects & closes the TCP socket.
Removes a channel from the managed channels.
Goes through the backlog and removes and optionally returns all matching objects.
Goes through the backlog and removes and optionally returns all matching objects.
Joins a room in IRC and creates the room object from it.
Sends a join command to a channel so messages can be sent in it.
Processes messages meant for mutliplayer rooms to update their state. called by mixin template
Calls all event subscribers to try to match this object, otherwise replace the oldest element in the backlog with this.
Calls all event subscribers to try to match this object, otherwise replace the oldest element in the backlog with this.
Calls all event subscribers to try to match this object, otherwise replace the oldest element in the backlog with this.
Manually wait until you can send a message again in a given channel.
Sends a message to a username or channel (#channel).
Waits for an event or returns one which is in the backlog already. Removes matching backlog entries.
Waits for an event or returns one which is in the backlog already. Removes matching backlog entries.
internal function to remove a room from the managed rooms list
Waits for an event or returns one which is in the backlog already. Removes matching backlog entries.
Waits for multiple messages sent at once and returns them.
Waits for an event or returns one which is in the backlog already. Removes matching backlog entries.
list of backlog which hasn't been handled by any event subscribers, oldest one will always be replaced on new ones.
list of backlog which hasn't been handled by any event subscribers, oldest one will always be replaced on new ones.
Set to true to slow down message sending to the limit allowed on osu.
true after the first line has been received.
IRC host to connect to.
Event emitted on a successful login.
Event emitted on a private message to the bot.
Event emitted for every motd line.
Credentials to use for authentication when connecting.
IRC port to use to connect.
list of event subscribers. Gets removed automatically when called and returns true, otherwise caller has to remove it.
list of event subscribers. Gets removed automatically when called and returns true, otherwise caller has to remove it.
Bancho ratelimiter instance.
Credentials to use for authentication when connecting.
BanchoBot bot = new BanchoBot("User", "hunter2"); runTask({ while (true) { bot.connect(); logDiagnostic("Got disconnected from bancho..."); sleep(2.seconds); } });
Represents a Bancho IRC connection.