Sends a message to the main thread to KamelosoLogger.critical text to the local terminal.
Sends a message to the main thread to KamelosoLogger.error text to the local terminal.
Sends a message to the main thread to KamelosoLogger.fatal text to the local terminal.
Sends a message to the main thread to KamelosoLogger.info text to the local terminal.
Sends a message to the main thread to KamelosoLogger.log text to the local terminal.
Sends a message to the main thread to KamelosoLogger.trace text to the local terminal.
Sends a message to the main thread to KamelosoLogger.warning text to the local terminal.
Simple alias to askToWarn, because both spellings are right.
Simple alias to askToWarn, because both spellings are right.
Sends a message to the main thread asking to print text to the local terminal.
Merely an alias to immediate, because we use both terms at different places.
Sends a message asking to print the supplied text to the local terminal, instead of doing it directly.
Sends a channel message.
Sends an ACTION "emote" to the supplied target (nickname or channel).
Immediately sends text to the server, verbatim. Skips all queues.
Invites a user to a channel.
Joins a channel.
Kicks a user from a channel.
Sets a channel mode.
Leaves a channel.
Sends either a channel message or a private query message depending on the arguments passed to it.
Sends a private query message to a user.
Disconnects from the server, optionally with a quit reason.
Sends text to the server, verbatim.
Replies to a message in a Twitch channel. Requires version TwitchSupport, without which it will just pass on to chan.
Sets the topic of a channel.
Queries the server for WHOIS information about a user.
An IRCEvent with some metadata, to be used when crafting an outgoing message to the server.
//IRCPluginState state; chan(state, "#channel", "Hello world!"); query(state, "nickname", "foo bar"); mode(state, "#channel", "nickname", "+o"); topic(state, "#channel", "I thought what I'd do was, I'd pretend I was one of those deaf-mutes.");
Having to supply the IRCPluginState on every call can be avoided for plugins, by mixing in MessagingProxy
and placing the messaging function calls inside a with (plugin) block.
IRCPluginState state; auto plugin = new MyPlugin(state); // has mixin MessagingProxy; with (plugin) { chan("#channel", "Foo bar baz"); query("nickname", "hello"); mode("#channel", string.init, "+b", "dudebro!*@*"); mode(string.init, "nickname", "+i"); }
Functions used to send messages to the server.
To send a server message some information is needed; like message type, message target, perhaps channel, content and such. IRCEvent has all of this, so it lends itself to repurposing it to aggregate and carry them, through message structs in an array "queue". These are caught by the main loop, which reversely parses them into strings and sends them on to the server.