RegisterObject() 공개 메소드

Register a new object in memory
public RegisterObject ( object Ob, string Nm ) : bool
Ob object Data
Nm string Name
리턴 bool
예제 #1
0
 public override void Hook_Channel(Channel channel)
 {
     if (channel.RetrieveObject("rss") == null)
     {
         channel.RegisterObject(new Feed(channel), "rss");
     }
 }
예제 #2
0
 public override void Hook_Channel(Channel channel)
 {
     if (channel.RetrieveObject("Statistics") == null)
     {
         channel.RegisterObject(new Statistics(channel), NAME);
     }
 }
예제 #3
0
 public override void Hook_Channel(Channel channel)
 {
     Syslog.Log("Loading " + channel.Name);
     if (channel == null)
     {
         Syslog.Log("NULL");
     }
     if (Snapshots)
     {
         try
         {
             if (Directory.Exists(SnapshotsDirectory + Path.DirectorySeparatorChar + channel.Name) == false)
             {
                 Syslog.Log("Creating directory for infobot for " + channel.Name);
                 Directory.CreateDirectory(SnapshotsDirectory + Path.DirectorySeparatorChar + channel.Name);
             }
         }
         catch (Exception fail)
         {
             Core.HandleException(fail, "infobot");
         }
     }
     if (channel.RetrieveObject("Infobot") == null)
     {
         // sensitivity
         bool cs = Module.GetConfig(channel, "Infobot.Case", true);
         channel.RegisterObject(new Infobot(getDB(ref channel), channel, this, cs), "Infobot");
     }
 }
예제 #4
0
 public override void Hook_Channel(Channel channel)
 {
     if (channel.RetrieveObject("RC") == null)
     {
         channel.RegisterObject(new RecentChanges(channel), "RC");
     }
 }