All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ircclouds.irc.api.commands.SendPrivateMessage Maven / Gradle / Ivy

There is a newer version: 1.0-0014
Show newest version
package com.ircclouds.irc.api.commands;

public class SendPrivateMessage implements ICommand
{
	private static final String PRIVMSG = "PRIVMSG ";

	private String target;
	private String msg;
	private Integer asyncRandConstant;
	
	public SendPrivateMessage(String aChannel, String aText)
	{
		this(aChannel, aText, null);
	}

	public SendPrivateMessage(String aTarget, String aText, Integer aAsyncRandConstant)
	{
		target = aTarget;
		msg = aText;
		asyncRandConstant = aAsyncRandConstant;
	}
	
	@Override
	public String asString()
	{
		if (asyncRandConstant == null)
		{
			return PRIVMSG + target + " :" + msg;
		}
		else
		{
			return PRIVMSG + target + "," + asyncRandConstant + " :" + msg;
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy