Package com.uwyn.drone.protocol.commands

Examples of com.uwyn.drone.protocol.commands.Privmsg


        // check if the syntax is correct
        if (!logsearch_matcher.matches() ||
          (logsearch_matcher.groupCount() < 1 &&
           logsearch_matcher.groupCount() > 2))
        {
          bot.send(new Privmsg(nick, "Invalid syntax '"+command+" "+arguments+"'."));
          return;
        }
       
        // get the different help arguments
        String module_name = null;
        String help_key = null;
        module_name = logsearch_matcher.group(1);
        if (logsearch_matcher.groupCount() > 1)
        {
          help_key = logsearch_matcher.group(2);
          if (0 == help_key.length())
          {
            help_key = null;
          }
        }
       
        // check if the module is known
        module = (Module)modules.get(module_name);
        if (null == module)
        {
          bot.send(new Privmsg(nick, "Unknown module '"+module_name+"'."));
          return;
        }
       
        // obtain the requested help text
        Map helpmap = module.getHelpMap();
        if (null == helpmap ||
          !helpmap.containsKey(help_key))
        {
          bot.send(new Privmsg(nick, "Couldn't find the requested help information in module '"+module_name+"'."));
          return;
        }
       
        // output the help text
        String help = (String)helpmap.get(help_key);
View Full Code Here


      processElement();
      return;
    }
   
    Bot      bot = BotFactory.get(submission.getBot());
    Privmsg    msg = new Privmsg(submission.getTarget(), submission.getMessage());
   
    try
    {
      bot.send(msg);
    }
View Full Code Here

TOP

Related Classes of com.uwyn.drone.protocol.commands.Privmsg

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.