示例#1
0
        public bool Plugin(IrcBotPlugin plugin)
        {
            if (!(plugin is IrcBotPlugin)) {
            return false;
              }

              plugin.Bot = this;

              plugin.Register();

              plugins.Add(plugin);

              return true;
        }
示例#2
0
 public MethodCommandTrigger(IrcBotPlugin plugin, OnCommandAttribute attribute, MethodInfo method)
     : base(plugin, attribute)
 {
     Method = method;
 }
示例#3
0
 public PropertyPreCommandTrigger(IrcBotPlugin plugin, PreCommandAttribute attribute, PropertyInfo property)
     : base(plugin, attribute)
 {
     Property = property;
 }
示例#4
0
 public PreCommandTrigger(IrcBotPlugin plugin, PreCommandAttribute attribute)
     : base(plugin)
 {
     Attribute = attribute;
 }
示例#5
0
 public MethodPreCommandTrigger(IrcBotPlugin plugin, PreCommandAttribute attribute, MethodInfo method)
     : base(plugin, attribute)
 {
     Method = method;
       if (method.ReturnType == typeof(bool)) {
     ReturnsBool = true;
       } else if (method.ReturnType != typeof(void)) {
     throw new Exception("method has to return either void or bool");
       }
 }
示例#6
0
 public JoinTrigger(IrcBotPlugin plugin, MethodInfo method)
     : base(plugin)
 {
     Method = method;
 }
示例#7
0
 public Trigger(IrcBotPlugin plugin)
 {
     Plugin = plugin;
 }