X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Firc%2FConnection.java;h=ade43c9f693e63879fd32aa7a5c91eaca5c9f97c;hb=3e5434124d9dc162883f4866174046799c3a3f33;hp=d12736375f7ac4d79023fa1cc4b8773179ad780b;hpb=207761aba7e6ddf5e736058f15e844a4df0d1f55;p=xudocci.git 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 //