Example #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);
        }
Example #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);
 }
Example #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);
 }
Example #4
0
 /// <summary>
 /// Is run on plugin load.
 /// </summary>        
 protected virtual void OnLoad(object sender, PluginEventArgs e)
 {
 }