コード例 #1
0
ファイル: IrcBot.cs プロジェクト: tgiphil/SmartIrcBot4net
        public bool Plugin(IrcBotPlugin plugin)
        {
            if (!(plugin is IrcBotPlugin)) {
            return false;
              }

              plugin.Bot = this;

              plugin.Register();

              plugins.Add(plugin);

              return true;
        }
コード例 #2
0
ファイル: Command.cs プロジェクト: tgiphil/SmartIrcBot4net
 public MethodCommandTrigger(IrcBotPlugin plugin, OnCommandAttribute attribute, MethodInfo method)
     : base(plugin, attribute)
 {
     Method = method;
 }
コード例 #3
0
ファイル: Command.cs プロジェクト: tgiphil/SmartIrcBot4net
 public PropertyPreCommandTrigger(IrcBotPlugin plugin, PreCommandAttribute attribute, PropertyInfo property)
     : base(plugin, attribute)
 {
     Property = property;
 }
コード例 #4
0
ファイル: Command.cs プロジェクト: tgiphil/SmartIrcBot4net
 public PreCommandTrigger(IrcBotPlugin plugin, PreCommandAttribute attribute)
     : base(plugin)
 {
     Attribute = attribute;
 }
コード例 #5
0
ファイル: Command.cs プロジェクト: tgiphil/SmartIrcBot4net
 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
ファイル: Join.cs プロジェクト: tgiphil/SmartIrcBot4net
 public JoinTrigger(IrcBotPlugin plugin, MethodInfo method)
     : base(plugin)
 {
     Method = method;
 }
コード例 #7
0
ファイル: Trigger.cs プロジェクト: tgiphil/SmartIrcBot4net
 public Trigger(IrcBotPlugin plugin)
 {
     Plugin = plugin;
 }