Package com.uwyn.drone.modules.logmanagement

Examples of com.uwyn.drone.modules.logmanagement.DatabaseLogs


    print(mTemplate);
  }
 
  public void doConfirm()
  {
    DatabaseLogs  database_log = DatabaseLogsFactory.get();
    try
    {
      database_log.install();
      mTemplate.setBlock("authenticated_content", "installed_content");
    }
    catch (LogManagerException e)
    {
      ValidationBuilderXhtml builder = new ValidationBuilderXhtml();
View Full Code Here


    print(mTemplate);
  }
 
  public void doConfirm()
  {
    DatabaseLogs  database_log = DatabaseLogsFactory.get();
    try
    {
      database_log.remove();
      mTemplate.setBlock("authenticated_content", "removed_content");
    }
    catch (LogManagerException e)
    {
      ValidationBuilderXhtml builder = new ValidationBuilderXhtml();
View Full Code Here

  }

  public void messageCommand(Bot bot, String nick, String command, String arguments, ServerMessage fullMessage)
  throws CoreException
  {
    DatabaseLogs  database_log = DatabaseLogsFactory.get();
    try
    {
      if (command.equals("logsearch"))
      {
        if (null == arguments ||
           0 == arguments.length())
        {
          bot.send(new Privmsg(nick, "You need to provide a search argument."));
          return;
        }

        Matcher logsearch_matcher = SEARCH_PATTERN.matcher(arguments);

        if (!logsearch_matcher.matches() ||
          logsearch_matcher.groupCount() != 2)
        {
          bot.send(new Privmsg(nick, "Invalid syntax '"+command+" "+arguments+"'"));
          return;
        }

        // obtain the requested channel
        String channel_name = logsearch_matcher.group(1);
        String search = logsearch_matcher.group(2);
        Channel  channel = bot.getServer().getChannel(channel_name);
        if (null == channel)
        {
          bot.send(new Privmsg(nick, "Unknown channel '"+channel_name+"'"));
          return;
        }

        SearchResults  search_results = new SearchResults(bot, nick);
        try
        {
          if (!database_log.searchLog(search_results, bot, channel, search))
          {
            bot.send(new Privmsg(nick, "No results for '"+search+"' could be found in channel '"+channel_name+"'."));
          }
        }
        catch (InvalidSearchSyntaxException e)
View Full Code Here

  }

  public void channelMessage(Bot bot, Channel channel, String nick, ServerMessage fullMessage)
  {
    Date            moment = new Date();
    DatabaseLogs  database_log = DatabaseLogsFactory.get();
    try
    {
      database_log.addLog(moment, bot, channel, fullMessage);
    }
    catch (LogManagerException e)
    {
      Logger.getLogger("com.uwyn.drone.modules").severe(ExceptionUtils.getExceptionStackTrace(e));
    }
View Full Code Here

TOP

Related Classes of com.uwyn.drone.modules.logmanagement.DatabaseLogs

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.