00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef lint
00021 static const char rcsid[] = "$Id: scriptdns.c,v 1.3 2008-10-17 15:57:43 sven Exp $";
00022 #endif
00023
00024 #include <eggdrop/eggdrop.h>
00025 #include "egg_script_internal.h"
00026
00027 static int script_dns_lookup(const char *host, script_callback_t *callback, char *text, int len)
00028 {
00029 return script_dns_query(egg_dns_lookup, host, callback, text, len);
00030 }
00031
00032 static int script_dns_reverse(const char *ip, script_callback_t *callback, char *text, int len)
00033 {
00034 return script_dns_query(egg_dns_reverse, ip, callback, text, len);
00035 }
00036
00037 script_command_t script_dns_cmds[] = {
00038 {"dns", "lookup", script_dns_lookup, NULL, 2, "scsi", "host callback ?callbackdata? ?len?", SCRIPT_INTEGER, SCRIPT_VAR_ARGS},
00039 {"dns", "reverse", script_dns_reverse, NULL, 2, "scsi", "ip callback ?callbackdata? ?len?", SCRIPT_INTEGER, SCRIPT_VAR_ARGS},
00040 {"dns", "cancel", egg_dns_cancel, NULL, 1, "ii", "id ?docallback?", SCRIPT_INTEGER, SCRIPT_VAR_ARGS},
00041 {0}
00042 };