summaryrefslogtreecommitdiffstats
path: root/EssentialsUpdate/src/f00f/net/irc/martyr/replies/ListReply.java
blob: a814c5a43eae05e46bea357118e823403051dee1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package f00f.net.irc.martyr.replies;

import f00f.net.irc.martyr.InCommand;

/**
 * Signals an entry of a LIST response.
 *
 * @author Daniel Henninger
 */
public class ListReply extends GenericReply
{

    private String requestor;
    private String channel;
    private Integer memberCount;
    private String topic;

    /**
	 * Factory constructor.
	 */
	public ListReply()
    {
	}

    public ListReply(String requestor, String channel, Integer memberCount, String topic)
    {
        this.requestor = requestor;
        this.channel = channel;
        this.memberCount = memberCount;
        this.topic = topic;
    }

    public String getIrcIdentifier()
    {
		return "322";
	}

    public InCommand parse( String prefix, String identifier, String params )
    {
		return new ListReply(getParameter(params, 0), getParameter(params, 1), Integer.parseInt(getParameter(params, 2)), getParameter(params, 3));
	}

    public String getChannel()
    {
        return channel;
    }

    public Integer getMemberCount()
    {
        return memberCount;
    }

    public String getTopic()
    {
        return topic;
    }

    public String getRequestor()
    {
        return requestor;
    }
    
}