예제 #1
0
        /// <summary>
        /// Is called by the bot on plugin load. Does some processing
        /// and then delegates to <see cref="OnLoad"/>. 
        /// </summary>        
        public void Plugin_Load(object sender, PluginEventArgs e)
        {
            Logger = e.Logger;

            string filePath = GetConfigFilePath(e.PluginDirectory);
            if (!string.IsNullOrEmpty(filePath))
                LoadConfig(filePath);

            OnLoad(sender, e);
        }
예제 #2
0
 private void Plugin_Load(object sender, PluginEventArgs e)
 {
     string file = System.IO.Path.Combine(e.PluginDirectory, "Fortune\\fortunes.txt");
     fortunes = System.IO.File.ReadAllLines(file);
 }
예제 #3
0
 private void Plugin_Load(object sender, PluginEventArgs e)
 {
     string file = System.IO.Path.Combine(e.PluginDirectory, "ChuckNorris\\facts.txt");
     facts = System.IO.File.ReadAllLines(file);
 }
예제 #4
0
 /// <summary>
 /// Is run on plugin load.
 /// </summary>        
 protected virtual void OnLoad(object sender, PluginEventArgs e)
 {
 }