1 // Kelsier project - Command info code (Command.cs)
2 // Written by the Jobbig codeteam. <http://jobbig.eu/code/>
4 // Copyright 2013 John Runyon.
6 // This file is part of the Kelsier project.
8 // Kelsier is free software: you can redistribute it and/or modify
9 // it under the terms of the GNU Affero General Public License as published by
10 // the Free Software Foundation, either version 3 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU Affero General Public License for more details.
18 // You should have received a copy of the GNU Affero General Public License
19 // along with this program. If not, see <http://www.gnu.org/licenses/>.
23 namespace Kelsier.Common {
24 public class Command {
25 public Bot bot { get; private set; }
26 public string cmd { get; private set; }
27 public string[] args { get; private set; }
28 public User user { get; private set; }
29 public Channel chan { get; private set; }
30 public bool chanmsg { get; private set; }
31 public string replyTo { get; private set; }
33 public Command(Bot bot, string cmd, string[] args, User user, Channel chan, bool chanmsg) {
39 this.chanmsg = chanmsg;
41 this.replyTo = chan.name;
43 this.replyTo = user.nick;
45 bot.log.debug(String.Format("cmd={0},args={1},user={2},chan={3},chanmsg={4},replyTo={5}", cmd, args.Length, user.nick, chan.name, chanmsg, replyTo));