Пример #1
0
def updatedata_cmd(args):
   """
   iptocountry_updatedata ["url"]
   Syncs the database with an internet database
   """
   if len(args) in (0, 1):
      if len(args) == 1:
         success = iptocountry.update_data(args[0])
      else:
         success = iptocountry.update_data()

      if success:
         es.dbgmsg(0, 'IPToCountry Example: Database successfully updated')
      else:
         es.dbgmsg(0, 'IPToCountry Example: Error updating database: ' + str(success))
   else:
      es.dbgmsg(0, 'Syntax: iptocountry_updatedata ["url"]')
def data_update():
    """ Updates the IPToCountry database """
    es.dbgmsg(0, 'IPToCountry Example: Updating IPToCountry database')

    if iptocountry.update_data():
        es.dbgmsg(0, 'IPToCountry Example: Update complete')
    else:
        es.dbgmsg(0, 'IPToCountry Example: Error updating database!')
Пример #3
0
def data_update():
   """ Updates the IPToCountry database """
   es.dbgmsg(0, 'IPToCountry Example: Updating IPToCountry database')

   if iptocountry.update_data():
      es.dbgmsg(0, 'IPToCountry Example: Update complete')
   else:
      es.dbgmsg(0, 'IPToCountry Example: Error updating database!')
def updatedata_cmd(args):
    """
   iptocountry_updatedata ["url"]
   Syncs the database with an internet database
   """
    if len(args) in (0, 1):
        if len(args) == 1:
            success = iptocountry.update_data(args[0])
        else:
            success = iptocountry.update_data()

        if success:
            es.dbgmsg(0, 'IPToCountry Example: Database successfully updated')
        else:
            es.dbgmsg(
                0, 'IPToCountry Example: Error updating database: ' +
                str(success))
    else:
        es.dbgmsg(0, 'Syntax: iptocountry_updatedata ["url"]')