Beispiel #1
0
        internal string getHelpContent(TgData.TgMessage RawMessage, string MessageType)
        {
            if (helpObjects == null)
            {
                return("");
            }
            string helpmsg = "";

            foreach (CallablePlugin plugin in helpObjects)
            {
                try
                {
                    object helpobj = plugin.callPlugin("GetHelpMessage", new object[] { RawMessage, MessageType });
                    if (helpobj != null)
                    {
                        helpmsg += (string)helpobj;
                    }
                }
                catch (NotImplementedException) { }
            }
            return(helpmsg);
        }
Beispiel #2
0
        internal static string getHelpMessage(List <PluginObject> plugins, TgData.TgMessage RawMessage, string MessageType)
        {
            string msg = "";

            foreach (PluginObject pl in plugins)
            {
                string pluginhelpmsg = null;
                try
                {
                    pluginhelpmsg = pl.getHelpContent(RawMessage, MessageType);
                }
                catch (NotImplementedException) { }
                catch (Exception e)
                {
                    RAPI.GetExceptionListener().OnException(e);
                }
                if (pluginhelpmsg != null || pluginhelpmsg != "")
                {
                    msg += "Plugin: " + pl.PluginName + "\n" + pluginhelpmsg + "\n\n";
                }
            }
            return(msg);
        }