From: David ‘Bombe’ Roden Date: Wed, 10 Apr 2013 04:21:15 +0000 (+0200) Subject: Add method to send messages. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=3e5434124d9dc162883f4866174046799c3a3f33;p=xudocci.git Add method to send messages. --- diff --git a/src/main/java/net/pterodactylus/irc/Connection.java b/src/main/java/net/pterodactylus/irc/Connection.java index d127363..ade43c9 100644 --- a/src/main/java/net/pterodactylus/irc/Connection.java +++ b/src/main/java/net/pterodactylus/irc/Connection.java @@ -207,6 +207,21 @@ public class Connection extends AbstractExecutionThreadService implements Servic connectionHandler.sendCommand("JOIN", channel); } + /** + * Sends a message to the given recipient, which may be a channel or another + * nickname. + * + * @param recipient + * The recipient of the message + * @param message + * The message + * @throws IOException + * if an I/O error occurs + */ + public void sendMessage(String recipient, String message) throws IOException { + connectionHandler.sendCommand("PRIVMSG", recipient, message); + } + // // ABSTRACTEXECUTIONTHREADSERVICE METHODS //