X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Firc%2FConnection.java;h=c7d5428157c8e73d76fcec2f37c115e45e022f24;hb=6bfd532fcd890c420d5542d71edc5923f071d082;hp=239f0a2a7ba25c5fc6ee7b789be2c1d50ad15555;hpb=a7367dcf6c5e0e7589b2ef89ebfa56c1a6d91775;p=xudocci.git diff --git a/src/main/java/net/pterodactylus/irc/Connection.java b/src/main/java/net/pterodactylus/irc/Connection.java index 239f0a2..c7d5428 100644 --- a/src/main/java/net/pterodactylus/irc/Connection.java +++ b/src/main/java/net/pterodactylus/irc/Connection.java @@ -201,6 +201,19 @@ public class Connection extends AbstractExecutionThreadService implements Servic // /** + * Checks whether the given source is the client represented by this + * connection. + * + * @param source + * The source to check + * @return {@code true} if this connection represents the given source, {@code + * false} otherwise + */ + public boolean isSource(Source source) { + return source.nick().isPresent() && source.nick().get().equals(nickname); + } + + /** * Joins the given channel. * * @param channel